diff scripts/io/textscan.m @ 12880:ff264eae88cf

textread.m, textscan.m: Read entire file when format repeat count is -1 * textread.m, textscan.m: Read entire file when format repeat count is -1.
author Rik <octave@nomad.inbox5.com>
date Sun, 24 Jul 2011 22:11:26 -0700
parents ddea3962b024
children f5a3f77d51aa
line wrap: on
line diff
--- a/scripts/io/textscan.m
+++ b/scripts/io/textscan.m
@@ -139,7 +139,7 @@
       fskipl (fid, varargin{headerlines + 1});
       args(headerlines:headerlines+1) = []; 
     endif
-    if (isfinite (nlines))
+    if (isfinite (nlines) && (nlines >= 0))
       str = tmp_str = "";
       n = 0;
       ## FIXME: Can this be done without slow loop?