mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
msvcrt: Don't write to buffer in ungetc if _IOSTRG flag is specified.
This commit is contained in:
parent
6122c2ba37
commit
ed2d53a36a
@ -4713,7 +4713,15 @@ int CDECL MSVCRT_ungetc(int c, MSVCRT_FILE * file)
|
||||
file->_ptr++;
|
||||
if(file->_ptr>file->_base) {
|
||||
file->_ptr--;
|
||||
if(file->_flag & MSVCRT__IOSTRG) {
|
||||
if(*file->_ptr != c) {
|
||||
file->_ptr++;
|
||||
MSVCRT__unlock_file(file);
|
||||
return MSVCRT_EOF;
|
||||
}
|
||||
}else {
|
||||
*file->_ptr = c;
|
||||
}
|
||||
file->_cnt++;
|
||||
MSVCRT_clearerr(file);
|
||||
MSVCRT__unlock_file(file);
|
||||
|
Loading…
Reference in New Issue
Block a user