From 53a4437be951f75b10a6d4acb73137868cb59b13 Mon Sep 17 00:00:00 2001 From: Vasilii Rogin Date: Tue, 23 May 2023 23:51:04 +0300 Subject: [PATCH] Remove trailing comma after reading strParseIntWithKey (#259) --- src/string_parsers.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/string_parsers.cc b/src/string_parsers.cc index e0d4b62..092b87f 100644 --- a/src/string_parsers.cc +++ b/src/string_parsers.cc @@ -208,6 +208,10 @@ int strParseIntWithKey(char** stringPtr, const char* key, int* valuePtr, const c *(str + v4) = tmp2; *(str + v2) = tmp1; + if (**stringPtr == ',') { + *stringPtr = *stringPtr + 1; + } + return result; }