Fixed Exception Issue

Solves Bug #3700
This commit is contained in:
Adrian Scillato 2018-09-05 18:35:02 -03:00 committed by GitHub
parent c6507482c4
commit b8e7ee8650
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,7 @@ char* subStr(char* dest, char* str, const char *delim, int index)
int i;
// Since strtok consumes the first arg, make a copy
strlcpy(dest, str, strlen(str));
strncpy(dest, str, strlen(str));
for (i = 1, act = dest; i <= index; i++, act = NULL) {
sub = strtok_r(act, delim, &ptr);
if (sub == NULL) break;