diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ini_read.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ini_read.c b/src/ini_read.c index 40774a3..28b7e18 100644 --- a/src/ini_read.c +++ b/src/ini_read.c @@ -41,11 +41,13 @@ char *strResize(char *ptr, size_t oldsize, size_t newsize){ } else if(ptr == NULL) { return tmp; } else if(newsize > oldsize) { // FEL - strncpy(tmp, ptr, oldsize); // old < new + //strncpy(tmp, ptr, oldsize); // old < new + snprintf(tmp, newsize, "%s", ptr); free(ptr); return tmp; } else if(newsize < oldsize){ //LE - strncpy(tmp, ptr, newsize); // new < old + //strncpy(tmp, ptr, newsize); // new < old + snprintf(tmp, newsize, "%s", ptr); free(ptr); return tmp; } else { //Ide sosem jutunk |