From cc0eb4651e4b204fb7926ddd84bb830f432aabd3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 13 Feb 2023 17:22:15 +0100 Subject: Fix PATH parsing incorrect if PATH does not contain : --- src/Linker.cpp | 4 ++-- 1 file 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 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; -- cgit v1.2.3