Commit 1366dd69 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Update consumed in all scanf variants on end of input.

parent 1d91c196
...@@ -79,9 +79,9 @@ ...@@ -79,9 +79,9 @@
#endif #endif
#ifdef STRING_LEN #ifdef STRING_LEN
#ifdef WIDE_SCANF #ifdef WIDE_SCANF
#define _GETC_(file) (consumed==length ? '\0' : (consumed++, *file++)) #define _GETC_(file) (consumed++, consumed>length ? '\0' : *file++)
#else /* WIDE_SCANF */ #else /* WIDE_SCANF */
#define _GETC_(file) (consumed==length ? '\0' : (consumed++, (unsigned char)*file++)) #define _GETC_(file) (consumed++, consumed>length ? '\0' : (unsigned char)*file++)
#endif /* WIDE_SCANF */ #endif /* WIDE_SCANF */
#define _UNGETC_(nch, file) do { file--; consumed--; } while(0) #define _UNGETC_(nch, file) do { file--; consumed--; } while(0)
#define _LOCK_FILE_(file) do {} while(0) #define _LOCK_FILE_(file) do {} while(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