[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62723] sscanf returns an error when there is
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #62723] sscanf returns an error when there is no error |
Date: |
Tue, 22 Nov 2022 06:53:47 -0500 (EST) |
Update of bug #62723 (project octave):
Status: Confirmed => Ready For Test
_______________________________________________________
Follow-up Comment #7:
If I understand the standard documentation correctly, trying to read a
character past the end of the stream sets the eofbit *and* the failbit:
https://en.cppreference.com/w/cpp/io/basic_istream/get
There is still one case where the failbit isn't reset that is triggered by the
example in comment #6.
I pushed a patch here that will hopefully make this pass without breaking
other use cases:
https://hg.savannah.gnu.org/hgweb/octave/rev/b39bf92a2364
I believe that follows along the approach you used for bug #63383.
Additionally, I stumbled across some probably older code (maybe from when
`error` didn't throw an exception immediately). I moved the clean-up code to
before throwing the exception here:
https://hg.savannah.gnu.org/hgweb/octave/rev/2a12350f9410
I hope that won't cause other regressions.
Marking as ready for test again.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62723>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/