16.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit b39eeb06 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed an off-by-one bug in StringUtils::splitStringsafe().

parent 7f1a3689
...@@ -126,7 +126,7 @@ namespace campvis { ...@@ -126,7 +126,7 @@ namespace campvis {
endpos = str.find_first_of(delimiter, strpos); endpos = str.find_first_of(delimiter, strpos);
toReturn.push_back(StringUtils::trim(str.substr(strpos, endpos - strpos), whitespace)); toReturn.push_back(StringUtils::trim(str.substr(strpos, endpos - strpos), whitespace));
} }
strpos = endpos + delimiter.length(); strpos = endpos + delimiter.length() - 1;
} }
return toReturn; return toReturn;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment