Author: greatlrd
Date: Thu Jun 1 13:38:11 2006
New Revision: 22144
URL:
http://svn.reactos.ru/svn/reactos?rev=22144&view=rev
Log:
Sorry I did wrong calc of the position of ungetc did not think of TCHAR size.
Modified:
trunk/reactos/lib/crt/stdio/ungetc.c
Modified: trunk/reactos/lib/crt/stdio/ungetc.c
URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/lib/crt/stdio/ungetc.c?rev=…
==============================================================================
--- trunk/reactos/lib/crt/stdio/ungetc.c (original)
+++ trunk/reactos/lib/crt/stdio/ungetc.c Thu Jun 1 13:38:11 2006
@@ -21,13 +21,11 @@
if (f->_ptr == f->_base)
{
- if (f->_cnt == 0)
- f->_ptr+=sizeof(_TCHAR);
- else
+ if (!f->_cnt == 0)
return _TEOF;
- }
+ }
- fseek(f, -1, SEEK_CUR);
+ fseek(f, -sizeof(_TCHAR), SEEK_CUR);
if(*(_TCHAR*)f->_ptr != c)
*((_TCHAR*)(f->_ptr)) = c;