ref: a915b13e0d0c612c12b8f54132ffa3189375dde5
parent: dc8d6356bb22ef018979fbbc915b6a7413479ede
parent: 51d5fc29b0b7cda79b593e499ff67a5960f6055b
author: Simon Howard <[email protected]>
date: Sat Apr 25 21:10:45 EDT 2015
Merge branch 'master' of github.com:chocolate-doom/chocolate-doom
--- a/src/deh_io.c
+++ b/src/deh_io.c
@@ -235,7 +235,7 @@
{
c = DEH_GetChar(context);
- if (c < 0)
+ if (c < 0 && pos == 0)
{
// end of file
@@ -273,7 +273,7 @@
// 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 @@
escaped = false;
}
- if (c == '\n')
+ if (c == '\n' || c < 0)
{
// end of line: a full line has been read