mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 07:33:20 +00:00
Sorry I did wrong calc of the position of ungetc did not think of TCHAR size.
svn path=/trunk/; revision=22144
This commit is contained in:
parent
fe3478c70d
commit
f1fe768fa8
1 changed files with 3 additions and 5 deletions
|
@ -21,13 +21,11 @@ _TINT _ungettc(_TINT c, FILE *f)
|
||||||
|
|
||||||
if (f->_ptr == f->_base)
|
if (f->_ptr == f->_base)
|
||||||
{
|
{
|
||||||
if (f->_cnt == 0)
|
if (!f->_cnt == 0)
|
||||||
f->_ptr+=sizeof(_TCHAR);
|
|
||||||
else
|
|
||||||
return _TEOF;
|
return _TEOF;
|
||||||
}
|
}
|
||||||
|
|
||||||
fseek(f, -1, SEEK_CUR);
|
fseek(f, -sizeof(_TCHAR), SEEK_CUR);
|
||||||
|
|
||||||
if(*(_TCHAR*)f->_ptr != c)
|
if(*(_TCHAR*)f->_ptr != c)
|
||||||
*((_TCHAR*)(f->_ptr)) = c;
|
*((_TCHAR*)(f->_ptr)) = c;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue