changeset 12994:b12e2cffaa2f stable

fix scanf problem with reading I (bug #33722) * oct-stream.cc (octave_scan<> (std::istream&, const scanf_format_elt&, double*)): Put characters back on input stream when Inf is not found.
author Pascal Dupuis <Pascal.Dupuis@uclouvain.be>
date Wed, 24 Aug 2011 11:32:18 -0400
parents dfab2a8ca545
children bac0858b92ee
files src/oct-stream.cc
diffstat 1 files changed, 16 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/oct-stream.cc
+++ b/src/oct-stream.cc
@@ -1352,17 +1352,24 @@
                                 is.putback (c3);
                                 is.putback (c2);
                                 is.putback (c1);
-
+                                
                                 is >> ref;
                               }
-                        }
-                      else
-                        {
-                          is.putback (c2);
-                          is.putback (c1);
-
-                          is >> ref;
-                        }
+                          }
+                        else
+                          {
+                            is.putback (c2);
+                            is.putback (c1);
+                            
+                            is >> ref;
+                          }
+                      }
+                    else
+                      {
+                        is.putback (c2);
+                        is.putback (c1);
+                        
+                        is >> ref;
                       }
                   }
               }