Fix non-null terminated string

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 073d20cd7c
commit 655e20a774
+2 -2
View File
@@ -24,7 +24,7 @@
#include <list> #include <list>
#include "str_functions.h" #include "str_functions.h"
static char splitChars[] = { ' ', '-', '\t' }; static const char splitChars[] = { " -\t" };
void removeAllWhiteSpace(char *str) void removeAllWhiteSpace(char *str)
{ {
@@ -67,7 +67,7 @@ std::string trim_start(std::string str)
return str.substr(i); return str.substr(i);
} }
std::vector<std::string> Explode(std::string str, char *splitChars) std::vector<std::string> Explode(std::string str, const char *splitChars)
{ {
std::vector<std::string> parts; std::vector<std::string> parts;
int startIndex = 0; int startIndex = 0;