summaryrefslogtreecommitdiff
path: root/Source/Swig/include.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Swig/include.c')
-rw-r--r--Source/Swig/include.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Swig/include.c b/Source/Swig/include.c
index baae44bb8..e3f256901 100644
--- a/Source/Swig/include.c
+++ b/Source/Swig/include.c
@@ -221,6 +221,8 @@ String *Swig_read_file(FILE *f) {
Append(str, buffer);
}
len = Len(str);
+ /* Add a newline if not present on last line -- the preprocessor seems to
+ * rely on \n and not EOF terminating lines */
if (len) {
char *cstr = Char(str);
if (cstr[len - 1] != '\n') {