From 855ea53e481c6b3335e1c468a85b590c97d508d2 Mon Sep 17 00:00:00 2001 From: Gregor Schneider Date: Fri, 19 Dec 2008 11:39:04 +0000 Subject: [PATCH] - Fix return values for fputc and _flsbuf: return only one char - Fixes three msvcrt file winetests svn path=/trunk/; revision=38184 --- reactos/lib/sdk/crt/stdio/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/sdk/crt/stdio/file.c b/reactos/lib/sdk/crt/stdio/file.c index e4fc8f7f4d0..2301956d3c9 100644 --- a/reactos/lib/sdk/crt/stdio/file.c +++ b/reactos/lib/sdk/crt/stdio/file.c @@ -2292,7 +2292,7 @@ int CDECL fputc(int c, FILE* file) return res ? res : c; } else - return c; + return c & 0xff; } else { return _flsbuf(c, file); } @@ -2321,7 +2321,7 @@ int CDECL _flsbuf(int c, FILE* file) unsigned char cc=c; int len; len = _write(file->_file, &cc, 1); - if (len == 1) return c; + if (len == 1) return c & 0xff; file->_flag |= _IOERR; return EOF; }