Piotr Caban : msvcrt: Remove incorrect cast in fgetws function.

Alexandre Julliard julliard at winehq.org
Mon Mar 25 14:19:39 CDT 2013


Module: wine
Branch: master
Commit: cde73251d818afdb135b722889d6f083fdb6c45a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=cde73251d818afdb135b722889d6f083fdb6c45a

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Wed Mar 20 10:39:37 2013 +0100

msvcrt: Remove incorrect cast in fgetws function.

---

 dlls/msvcrt/file.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 28aefc1..6e8b324 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -3315,7 +3315,7 @@ MSVCRT_wint_t CDECL MSVCRT_getwchar(void)
  */
 MSVCRT_wchar_t * CDECL MSVCRT_fgetws(MSVCRT_wchar_t *s, int size, MSVCRT_FILE* file)
 {
-  int    cc = MSVCRT_WEOF;
+  MSVCRT_wint_t cc = MSVCRT_WEOF;
   MSVCRT_wchar_t * buf_start = s;
 
   TRACE(":file(%p) fd (%d) str (%p) len (%d)\n",
@@ -3325,7 +3325,7 @@ MSVCRT_wchar_t * CDECL MSVCRT_fgetws(MSVCRT_wchar_t *s, int size, MSVCRT_FILE* f
 
   while ((size >1) && (cc = MSVCRT_fgetwc(file)) != MSVCRT_WEOF && cc != '\n')
     {
-      *s++ = (char)cc;
+      *s++ = cc;
       size --;
     }
   if ((cc == MSVCRT_WEOF) && (s == buf_start)) /* If nothing read, return 0*/




More information about the wine-cvs mailing list