aboutsummaryrefslogtreecommitdiff
path: root/pgm-interlace.c
diff options
context:
space:
mode:
Diffstat (limited to 'pgm-interlace.c')
-rw-r--r--pgm-interlace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pgm-interlace.c b/pgm-interlace.c
index 8aa94d6..6923dc9 100644
--- a/pgm-interlace.c
+++ b/pgm-interlace.c
@@ -131,7 +131,7 @@ int parse_header(FILE *fd, char *magic, long *width, long *height, int *white)
fprintf(stderr, "Error reading width\n");
return 1;
}
- *width = atoi(token);
+ *width = atol(token);
read_whitespace(fd);
if (read_number(fd, token, sizeof(token)))
@@ -139,7 +139,7 @@ int parse_header(FILE *fd, char *magic, long *width, long *height, int *white)
fprintf(stderr, "Error reading height\n");
return 1;
}
- *height = atoi(token); /* size == height */
+ *height = atol(token); /* size == height */
read_whitespace(fd);
if (read_number(fd, token, sizeof(token)))
@@ -147,7 +147,7 @@ int parse_header(FILE *fd, char *magic, long *width, long *height, int *white)
fprintf(stderr, "Error reading white value\n");
return 1;
}
- *white = atoi(token);
+ *white = atol(token);
/* standard dictates one whitespace character. This character must be
* whitespace or EOF because of token parsing logic */