Yet another buffer size fix

This commit is contained in:
Makise Kurisu 2016-05-08 14:28:38 +02:00
parent fdf04cb659
commit 23a642820e
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -423,7 +423,7 @@ char* append_string(char **dest, const char *src) {
*dest[0] = 0;
}
else {
*dest = realloc(*dest, (strlen(*dest) + strlen(src)) * sizeof(char));
*dest = realloc(*dest, (strlen(*dest) + strlen(src) + 1) * sizeof(char));
}
strcat(*dest, src);