fixing the bugs when you write after quotes the ptr was not incremented correctly

This commit is contained in:
Clément Le Bihan
2020-05-21 14:26:37 +02:00
parent 870b1df1ae
commit 3486bd99db
+2 -2
View File
@@ -62,8 +62,8 @@ int manage_specials_parsers(char *cmd, int index, char **buffer, int *inc, char
*buffer = add_to_buffer(*buffer, *ptr, (*inc) - 1, true);
*buffer = add_to_buffer(*buffer, data, strlen(data), false);
free(data);
*inc = -1;
*ptr = cmd + index + 1;
*inc = 0;
*ptr = cmd + index + new_index + 1;
if (!(*buffer))
return (-1);
return (new_index);