[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of out
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values. |
Date: |
Fri, 9 Dec 2022 16:08:52 -0500 (EST) |
Follow-up Comment #19, bug #63462 (project octave):
It seems that the true issue is something else. At several locations in
Octave's code, the stream state is reset and the eof bit is cleared. See
lo-utils.cc:329 for example.
// True error.
// Reset stream to original position, clear eof bit, pass status
on.
is.clear ();
is.seekg (pos);
is.setstate (status & ~std::ios_base::eofbit);
So, whenever Octave encounters an eof condition and does not handle it
properly, the same text may be parsed again and again. As a consequence, the
last value in the string may be duplicated if the end of the string is
reached.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63462>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., (continued)
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., anonymous, 2022/12/04
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., Dmitri A. Sergatskov, 2022/12/04
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., Rik, 2022/12/04
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., Dmitri A. Sergatskov, 2022/12/04
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., anonymous, 2022/12/05
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., Dmitri A. Sergatskov, 2022/12/05
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., Rik, 2022/12/06
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., anonymous, 2022/12/08
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., anonymous, 2022/12/08
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values., Rik, 2022/12/08
- [Octave-bug-tracker] [bug #63462] sscanf reports incorrect number of output values.,
anonymous <=