Skip to content

Commit

Permalink
fix: prevent self-link
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed Dec 4, 2023
1 parent 6c356f6 commit 5653e08
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.21)
project(venmic LANGUAGES CXX VERSION 2.1.3)
project(venmic LANGUAGES CXX VERSION 2.1.4)

# --------------------------------------------------------------------------------------------------------
# Library options
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"private": false,
"license": "MIT",
"author": "Curve (https://github.com/Curve)",
"version": "2.1.3",
"version": "2.1.4",
"main": "./lib/index.js",
"types": "./lib/module.d.ts",
"scripts": {
Expand Down
6 changes: 6 additions & 0 deletions src/patchbay.impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ namespace vencord
return;
}

if (id == mic->id())
{
logger::get()->warn("tried to link venmic to itself, this shouldn't happen!");
return;
}

logger::get()->debug("trying to link {}, mic is {}", id, mic->id());

auto &target = nodes[id];
Expand Down

0 comments on commit 5653e08

Please sign in to comment.