Save_INI_set_string() : make sure there is at least one space before the value

This commit is contained in:
Thomas Bernard 2019-02-01 13:09:30 +01:00
parent 1732b32d78
commit 5623c67be1
No known key found for this signature in database
GPG Key ID: 0FF11B67A5C0863C

View File

@ -246,6 +246,9 @@ static void Save_INI_set_string(char * dest,const char * source,const char * val
// Pour l'instant, la source et la destination en sont au même point:
dest_index=source_index;
if (dest_index > 0 && dest[dest_index - 1] == '=') // at least one space before value
dest[dest_index++] = ' ';
// Dans la destination, on écrit la valeur:
strcpy(dest+dest_index,value);
dest_index+=strlen(value);