summaryrefslogtreecommitdiff
path: root/cxpm/cxpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'cxpm/cxpm.c')
-rw-r--r--cxpm/cxpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cxpm/cxpm.c b/cxpm/cxpm.c
index 8b8af9a..94865e0 100644
--- a/cxpm/cxpm.c
+++ b/cxpm/cxpm.c
@@ -61,7 +61,7 @@ sGetc(xpmData *data, FILE *file)
if (c == '\n') {
data->lineNum++;
data->charNum = 0;
- } else {
+ } else if (c != EOF) {
data->charNum++;
}
return c;
@@ -74,7 +74,7 @@ sUngetc(xpmData *data, int c, FILE *file)
if (c == '\n') {
data->lineNum--;
data->charNum = 0;
- } else {
+ } else if (c != EOF) {
data->charNum--;
}
}