summaryrefslogtreecommitdiff
path: root/user/mcpp/04-gniibe-fix-12.patch
blob: 13d29d62ffc7ee5c3d38a3f2294769c2e3c354d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: Fix for a bug reported to sourceforge.net #12
Author: NIIBE Yutaka

Index: mcpp/src/support.c
===================================================================
--- mcpp.orig/src/support.c
+++ mcpp/src/support.c
@@ -1948,6 +1948,9 @@ static char *   get_line(
             dump_string( NULL, ptr);
         }
         len = strlen( ptr);
+        if (len == 0)
+                cwarn( "null character ignored", NULL, 0L, NULL);
+
         if (NBUFF - 1 <= ptr - infile->buffer + len
                 && *(ptr + len - 1) != '\n') {
                 /* The line does not yet end, though the buffer is full.    */