msvcrt: Fix scanf file locking when returning EOF.

Fixes regression introduced in 0a89a69913.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48087
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
stable
Erich E. Hoover 2019-11-13 14:52:51 -07:00 committed by Alexandre Julliard
parent da238dc1d1
commit 925a88d1f7
1 changed files with 2 additions and 0 deletions

View File

@ -489,6 +489,7 @@ _FUNCTION_ {
}
/* if we have reached the EOF and output nothing then report EOF */
if (nch==_EOF_ && rd==0 && st==0) {
_UNLOCK_FILE_(file);
return _EOF_RET;
}
/* terminate */
@ -524,6 +525,7 @@ _FUNCTION_ {
#if _MSVCR_VER >= 80
/* if we have reached the EOF and output nothing then report EOF */
if (nch==_EOF_ && rd==0 && st==0) {
_UNLOCK_FILE_(file);
return _EOF_RET;
}
#endif