summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index ddb3ce9..f61bdbd 100644
--- a/src/util.c
+++ b/src/util.c
@@ -20,7 +20,7 @@ pgm_read(char *filename, unsigned char **buf, int *xsize, int *ysize)
return -1;
if (fscanf(f, "P5\n%d %d\n255\n", &width, &height) == 0)
- return -1;
+ goto fail;
if (width * height <= 0)
goto fail;