Commit cde73251 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Remove incorrect cast in fgetws function.

parent 6b616f3e
...@@ -3315,7 +3315,7 @@ MSVCRT_wint_t CDECL MSVCRT_getwchar(void) ...@@ -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) 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; MSVCRT_wchar_t * buf_start = s;
TRACE(":file(%p) fd (%d) str (%p) len (%d)\n", 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 ...@@ -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') while ((size >1) && (cc = MSVCRT_fgetwc(file)) != MSVCRT_WEOF && cc != '\n')
{ {
*s++ = (char)cc; *s++ = cc;
size --; size --;
} }
if ((cc == MSVCRT_WEOF) && (s == buf_start)) /* If nothing read, return 0*/ if ((cc == MSVCRT_WEOF) && (s == buf_start)) /* If nothing read, return 0*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment