Erich E. Hoover : msvcrt: Fix scanf file locking when returning EOF.
Module: wine Branch: master Commit: 925a88d1f701da76974eb967fd799152b25d6613 URL: https://source.winehq.org/git/wine.git/?a=commit;h=925a88d1f701da76974eb967f... Author: Erich E. Hoover <erich.e.hoover(a)gmail.com> Date: Wed Nov 13 14:52:51 2019 -0700 msvcrt: Fix scanf file locking when returning EOF. Fixes regression introduced in 0a89a699135802b083d142130d3b0ef618485478. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48087 Signed-off-by: Erich E. Hoover <erich.e.hoover(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/scanf.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/msvcrt/scanf.h b/dlls/msvcrt/scanf.h index e2f216110d..de2a2af975 100644 --- a/dlls/msvcrt/scanf.h +++ b/dlls/msvcrt/scanf.h @@ -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
participants (1)
-
Alexandre Julliard