changeset 5266:3fe873712e07

[project @ 2005-04-05 15:49:50 by jwe]
author jwe
date Tue, 05 Apr 2005 15:49:50 +0000
parents 86185152b7a4
children 2969ccb6ff71
files src/ChangeLog src/oct-stream.cc
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Apr 05 13:28:49 2005 +0000
+++ b/src/ChangeLog	Tue Apr 05 15:49:50 2005 +0000
@@ -1,5 +1,8 @@
 2005-04-05  John W. Eaton  <jwe@octave.org>
 
+	* oct-stream.cc (BEGIN_C_CONVERSION): Clear stream state if
+	we hit EOF after we read something.
+
 	* pt-assign.cc (tree_multi_assignment::rvalue):
 	Allow assignments of the form [a,b,c] = x{:}.
 
--- a/src/oct-stream.cc	Tue Apr 05 13:28:49 2005 +0000
+++ b/src/oct-stream.cc	Tue Apr 05 15:49:50 2005 +0000
@@ -1460,6 +1460,9 @@
  \
   tbuf[n] = '\0'; \
  \
+  if (n > 0 && c == EOF) \
+    is.clear (); \
+ \
   std::string tmp = tbuf; \
  \
   delete [] tbuf