summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2015-04-26 01:10:45 -0400
committerSimon Howard2015-04-26 01:10:45 -0400
commita915b13e0d0c612c12b8f54132ffa3189375dde5 (patch)
treeff722eeb45f770c9135b50a4031f8f9ae4967bc0
parentdc8d6356bb22ef018979fbbc915b6a7413479ede (diff)
parent51d5fc29b0b7cda79b593e499ff67a5960f6055b (diff)
downloadchocolate-doom-a915b13e0d0c612c12b8f54132ffa3189375dde5.tar.gz
chocolate-doom-a915b13e0d0c612c12b8f54132ffa3189375dde5.tar.bz2
chocolate-doom-a915b13e0d0c612c12b8f54132ffa3189375dde5.zip
Merge branch 'master' of github.com:chocolate-doom/chocolate-doom
-rw-r--r--src/deh_io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/deh_io.c b/src/deh_io.c
index c5e81b0a..e8beb438 100644
--- a/src/deh_io.c
+++ b/src/deh_io.c
@@ -235,7 +235,7 @@ char *DEH_ReadLine(deh_context_t *context, boolean extended)
{
c = DEH_GetChar(context);
- if (c < 0)
+ if (c < 0 && pos == 0)
{
// end of file
@@ -273,7 +273,7 @@ char *DEH_ReadLine(deh_context_t *context, boolean extended)
// blanks before the backslash are included in the string
// but indentation after the linefeed is not
- if (escaped && isspace(c) && c != '\n')
+ if (escaped && c >= 0 && isspace(c) && c != '\n')
{
continue;
}
@@ -282,7 +282,7 @@ char *DEH_ReadLine(deh_context_t *context, boolean extended)
escaped = false;
}
- if (c == '\n')
+ if (c == '\n' || c < 0)
{
// end of line: a full line has been read