mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-27 03:43:36 +00:00
getc must return unsigned chars, cast to int
svn path=/trunk/; revision=3990
This commit is contained in:
@@ -25,7 +25,7 @@ int getc(FILE *fp)
|
||||
|
||||
if(fp->_cnt > 0) {
|
||||
fp->_cnt--;
|
||||
c = (int)*fp->_ptr++;
|
||||
c = (int)(*fp->_ptr++ & 0377);
|
||||
}
|
||||
else {
|
||||
c = _filbuf(fp);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $Id: getc.c,v 1.7 2002/12/08 16:11:59 robd Exp $
|
||||
/* $Id: getc.c,v 1.8 2003/01/11 22:40:24 gvg Exp $
|
||||
*
|
||||
* ReactOS msvcrt library
|
||||
*
|
||||
@@ -51,7 +51,7 @@ int getc(FILE *fp)
|
||||
}
|
||||
if(fp->_cnt > 0) {
|
||||
fp->_cnt--;
|
||||
c = (int)*fp->_ptr++;
|
||||
c = (int)(*fp->_ptr++ & 0377);
|
||||
} else {
|
||||
c = _filbuf(fp);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ wint_t getwc(FILE *fp)
|
||||
do {
|
||||
if (fp->_cnt > 0) {
|
||||
fp->_cnt--;
|
||||
mbchar[mb_cnt] = *fp->_ptr++;
|
||||
mbchar[mb_cnt] = *fp->_ptr++ & 0377;
|
||||
} else {
|
||||
mbchar[mb_cnt] = _filbuf(fp);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ wint_t getwc(FILE *fp)
|
||||
#else
|
||||
if (fp->_cnt > 0) {
|
||||
fp->_cnt--;
|
||||
c = *fp->_ptr++;
|
||||
c = *fp->_ptr++ &0377;
|
||||
} else {
|
||||
c = _filbuf(fp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user