aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-02-13 17:22:15 +0100
committerdec05eba <dec05eba@protonmail.com>2023-02-13 17:22:15 +0100
commitcc0eb4651e4b204fb7926ddd84bb830f432aabd3 (patch)
tree044029b55aca2f5e1290db40867278cce24c3531
parent2348c9fc53045ab4576757ff5df1b93146ceebe3 (diff)
Fix PATH parsing incorrect if PATH does not contain :
-rw-r--r--src/Linker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Linker.cpp b/src/Linker.cpp
index 7d90d46..1546909 100644
--- a/src/Linker.cpp
+++ b/src/Linker.cpp
@@ -4,9 +4,9 @@
static void split_string(const std::string &str, char delimiter, std::function<bool(const char*,size_t)> callback) {
size_t index = 0;
while(index < str.size()) {
- const size_t end_index = str.find(delimiter, index);
+ size_t end_index = str.find(delimiter, index);
if(end_index == std::string::npos)
- break;
+ end_index = str.size();
if(!callback(&str[index], end_index - index))
break;