mirror of
https://github.com/reactos/reactos.git
synced 2025-07-27 14:43:35 +00:00
- Fix return values for fputc and _flsbuf: return only one char
- Fixes three msvcrt file winetests svn path=/trunk/; revision=38184
This commit is contained in:
parent
fd478ccca5
commit
855ea53e48
1 changed files with 2 additions and 2 deletions
|
@ -2292,7 +2292,7 @@ int CDECL fputc(int c, FILE* file)
|
||||||
return res ? res : c;
|
return res ? res : c;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return c;
|
return c & 0xff;
|
||||||
} else {
|
} else {
|
||||||
return _flsbuf(c, file);
|
return _flsbuf(c, file);
|
||||||
}
|
}
|
||||||
|
@ -2321,7 +2321,7 @@ int CDECL _flsbuf(int c, FILE* file)
|
||||||
unsigned char cc=c;
|
unsigned char cc=c;
|
||||||
int len;
|
int len;
|
||||||
len = _write(file->_file, &cc, 1);
|
len = _write(file->_file, &cc, 1);
|
||||||
if (len == 1) return c;
|
if (len == 1) return c & 0xff;
|
||||||
file->_flag |= _IOERR;
|
file->_flag |= _IOERR;
|
||||||
return EOF;
|
return EOF;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue