changeset 17876:b951a8351fd7

Fix display of char arrays in GUI Variable window. * libinterp/octave-value/ov-str-mat.cc(short_disp): Use parentheses around tertiary operator expression so that C++ stream operator '<<' doesn't grab result of test, rather than output of test.
author Rik <rik@octave.org>
date Thu, 07 Nov 2013 10:21:45 -0800
parents 8fde5edabedd
children 540d1c122b08
files libinterp/octave-value/ov-str-mat.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave-value/ov-str-mat.cc	Thu Nov 07 10:06:06 2013 -0800
+++ b/libinterp/octave-value/ov-str-mat.cc	Thu Nov 07 10:21:45 2013 -0800
@@ -280,7 +280,7 @@
       // FIXME: should this be configurable?
       size_t max_len = 100;
 
-      os << (tmp.length () > max_len) ? tmp.substr (0, 100) : tmp;
+      os << (tmp.length () > max_len ? tmp.substr (0, 100) : tmp);
     }
 }