1
0
mirror of https://github.com/cclassic/model-ghdl synced 2024-11-21 08:25:05 +01:00

Yet another buffer size fix

This commit is contained in:
Markus Koch 2016-05-08 14:28:38 +02:00
parent fdf04cb659
commit 23a642820e

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);