diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-04-04 19:17:38 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-04-04 19:17:38 -0600 |
commit | d79ca5c109ab12b4c1292fe16d17dab6919722a5 (patch) | |
tree | 43f3f67b07d037b50a47156097195aac0fc4b751 /src/map/npc.c | |
parent | 1e87b3a15f2098fa5b7ad0a895c51f0bfe872267 (diff) | |
parent | b683a1ba9ba9e46bab0d8f94e38ef56669f8530a (diff) | |
download | tmwa-d79ca5c109ab12b4c1292fe16d17dab6919722a5.tar.gz tmwa-d79ca5c109ab12b4c1292fe16d17dab6919722a5.tar.bz2 tmwa-d79ca5c109ab12b4c1292fe16d17dab6919722a5.tar.xz tmwa-d79ca5c109ab12b4c1292fe16d17dab6919722a5.zip |
Merge commit 'refs/merge-requests/2' of git://gitorious.org/tmw-eathena/mainline
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index edbf548..ab0e7ff 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1543,7 +1543,8 @@ static int npc_parse_script (char *w1, char *w2, char *w3, char *w4, for (i = strlen (srcbuf) - 1; i >= 0 && isspace (srcbuf[i]); i--); if (i >= 0 && srcbuf[i] == '}') break; - fgets (line, 1020, fp); + if (!fgets (line, 1020, fp)) + break; (*lines)++; if (feof (fp)) break; @@ -1827,7 +1828,8 @@ static int npc_parse_function (char *w1, char *w2, char *w3, char *w4, for (i = strlen (srcbuf) - 1; i >= 0 && isspace (srcbuf[i]); i--); if (i >= 0 && srcbuf[i] == '}') break; - fgets (line, 1020, fp); + if (!fgets (line, 1020, fp)) + break; (*lines)++; if (feof (fp)) break; |