Mercurial > hg > octave-terminal
changeset 12940:3509cf60d1f6
strread.m: %Ns conversion format now honors user specified width (Bug #33950).
* strread.m: Fix typo in code which fixed width at 3, regardless of user input.
author | Philip Nienhuis <prnienhuis@@users.sf.net> |
---|---|
date | Tue, 09 Aug 2011 07:42:10 -0700 |
parents | 9f2679a14366 |
children | 1be5f06d9fa7 |
files | scripts/io/strread.m |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/io/strread.m +++ b/scripts/io/strread.m @@ -471,7 +471,7 @@ endif endfor ## Done - words_period = iwrd - 1; + words_period = max (iwrd - 1, 1); num_lines = ceil (num_words / words_period); ## 2. Pad words array so that it can be reshaped @@ -633,7 +633,7 @@ if (pad_out) data(end+1:num_lines) = {""} endif - varargout{k} = strtrunc (data, 3)'; + varargout{k} = strtrunc (data, swidth)'; k++; otherwise endswitch