Fix handling of byte value 255 in input files on platforms where
char is signed (it was getting mapped to EOF). Fixes SF#1518219. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10211 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b79e9a7d7e
commit
ddb7c73411
3 changed files with 8 additions and 4 deletions
|
|
@ -545,7 +545,7 @@ static int String_getc(DOH *so) {
|
|||
if (s->sp >= s->len)
|
||||
c = EOF;
|
||||
else
|
||||
c = (int) s->str[s->sp++];
|
||||
c = (int)(unsigned char) s->str[s->sp++];
|
||||
if (c == '\n')
|
||||
s->line++;
|
||||
return c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue