memory bug corrected
This commit is contained in:
@@ -113,7 +113,7 @@ char *str_read_file(char *file) {
|
||||
i=stat(file, &statbuf);
|
||||
if (i<0) ERR_MSG("file not found");
|
||||
size=statbuf.st_size+4;
|
||||
ERR_SP(str=malloc(size));
|
||||
ERR_SP(str=my_malloc(size, file));
|
||||
e=&str[size-1];
|
||||
ERR_SP(fil=fopen(file, "r"));
|
||||
s=str;
|
||||
|
||||
Reference in New Issue
Block a user