diff options
-rw-r--r-- | note.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -76,7 +76,9 @@ last(char *fullpath) } fseek(fp, 0, SEEK_END); - pos = ftell(fp); + + if (!(pos = ftell(fp))) + exit(0); while (1) { fseek(fp, --pos, SEEK_SET); |
index : note | ||
Simple note-taking program written in C | tsxv478 |
summaryrefslogtreecommitdiff |
-rw-r--r-- | note.c | 4 |
@@ -76,7 +76,9 @@ last(char *fullpath) } fseek(fp, 0, SEEK_END); - pos = ftell(fp); + + if (!(pos = ftell(fp))) + exit(0); while (1) { fseek(fp, --pos, SEEK_SET); |