http://bugs.winehq.org/show_bug.cgi?id=11187
Summary: Scanf bug Product: Wine Version: 0.9.53. Platform: All OS/Version: other Status: UNCONFIRMED Severity: normal Priority: P2 Component: dos AssignedTo: wine-bugs@winehq.org ReportedBy: matteo.miraz+wine@gmail.com
Created an attachment (id=10244) --> (http://bugs.winehq.org/attachment.cgi?id=10244) Scanf Bug
Scanf seems to not work correctly.
How to reproduce the bug: 1) install in wine the Dev-cpp 2) write a simple program that performs at least two scanf (see attachment) 3) run it...
expected result: each scanf read a value from the keyboard
actual result: the first scanf works fine. Subsequent read from keybord not
http://bugs.winehq.org/show_bug.cgi?id=11187
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|dos |msvcrt Keywords| |source Platform|All |Other
http://bugs.winehq.org/show_bug.cgi?id=11187
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #10244|text/x-csrc |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=11187
--- Comment #1 from Vijay Kamuju infyquest@gmail.com 2008-01-14 14:07:44 --- try putting an fflush(stdin); before doing the second scanf and try it in wine.
http://bugs.winehq.org/show_bug.cgi?id=11187
--- Comment #2 from Matteo matteo.miraz+wine@gmail.com 2008-01-14 16:39:59 --- (In reply to comment #1)
This is one of the first things I've tried. Anyway: 1) the example do have the fflush(stdin) before reading from the stdin 2) the same program works fine if compiled under windows or under linux
For these reason, I think that the bug is still open and needs to be fixed :)
Anyway, thank you for your proposal!
try putting an fflush(stdin); before doing the second scanf and try it in wine.
http://bugs.winehq.org/show_bug.cgi?id=11187
Kirill K. Smirnov lich@math.spbu.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lich@math.spbu.ru, | |dank@kegel.com
--- Comment #3 from Kirill K. Smirnov lich@math.spbu.ru 2008-01-15 16:03:09 --- The patch caused this bug: http://www.winehq.org/pipermail/wine-cvs/2007-October/036795.html
Author: Dan Kegel <dank at kegel.com> Date: Fri Oct 5 04:27:08 2007 -0700
msvcrt: Fix ^Z handling in text mode.
When I commented out this block of code: + if (MSVCRT_fdesc[fd].wxflag & WX_READEOF) { + MSVCRT_fdesc[fd].wxflag |= WX_ATEOF; + TRACE("already at EOF, returning 0\n"); + return 0; + }
bug disappeared (but msvcrt tests fail).
http://bugs.winehq.org/show_bug.cgi?id=11187
--- Comment #4 from Dan Kegel dank@kegel.com 2008-01-15 16:18:08 --- That's interesting.
Can a test case be written for this, using pipes or something?
When we fix this, let's be careful to not cause a regression in bug 9894.
http://bugs.winehq.org/show_bug.cgi?id=11187
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |reza12127@yahoo.com
--- Comment #5 from Austin English austinenglish@gmail.com 2008-01-21 12:47:28 --- *** Bug 11246 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=11187
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=11187
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #6 from Dan Kegel dank@kegel.com 2008-02-08 08:36:28 --- Sorry for the breakage. According to http://www.winehq.org/pipermail/wine-patches/2008-February/049557.html this also affects the MinGW port of git-fetch-pack, so comfirming. His patch was right but not complete; I've added a test and the missing bit, and submitted it as http://www.winehq.org/pipermail/wine-patches/2008-February/049807.html Let me know if that doesn't resolve everything.
http://bugs.winehq.org/show_bug.cgi?id=11187
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #7 from Dan Kegel dank@kegel.com 2008-02-12 19:34:07 --- Patch committed, http://winehq.org/pipermail/wine-cvs/2008-February/040190.html
http://bugs.winehq.org/show_bug.cgi?id=11187
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Dan Kegel dank@kegel.com 2008-02-22 11:39:58 --- 0.9.56 released, so closing all bugs marked as RESOLVED FIXED.