changeset 31171:c90718a28a3c

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 02 Aug 2022 18:47:12 +0200
parents e37e46ef0505 (current diff) bcd75c07c9e8 (diff)
children 06dc7fe25322
files libinterp/corefcn/oct-stream.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc	Fri Jul 29 20:53:45 2022 -0700
+++ b/libinterp/corefcn/oct-stream.cc	Tue Aug 02 18:47:12 2022 +0200
@@ -5042,7 +5042,7 @@
 
                     // If it looks like we have a matching failure, then
                     // reset the failbit in the stream state.
-                    if (is.rdstate () & std::ios::failbit)
+                    if (! is.eof () && is.rdstate () & std::ios::failbit)
                       {
                         error (who, "format failed to match");
                         is.clear (is.rdstate () & (~std::ios::failbit));