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

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-01-03 19:42:07 +01:00 committed by Alexandre Julliard
parent 1d91c196e7
commit 1366dd69d5
1 changed files with 2 additions and 2 deletions

View File

@ -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)