mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 20:00:58 +01:00
added error checking
This commit is contained in:
@@ -161,6 +161,8 @@ char *pcp_readz85file(FILE *infile) {
|
||||
while(!feof(infile)) {
|
||||
if(!fread(&byte, 1, 1, infile))
|
||||
break;
|
||||
if(ferror(infile) != 0)
|
||||
break;
|
||||
tmp = realloc(input, bufsize + 1);
|
||||
input = tmp;
|
||||
memmove(&input[bufsize], byte, 1);
|
||||
|
||||
Reference in New Issue
Block a user