Mercurial > octave
diff libinterp/parse-tree/pt-mat.cc @ 21261:f982cfe3df03
When concatenating cells, suppress empty matrices (bug #43511).
* pt-mat.cc (cellify): Replace [] by {}, not by {[]}.
* __patch__.m: Change concatenation to guarantee reproducibility.
author | Lachlan <lachlanbis@gmail.com> |
---|---|
date | Tue, 26 Jan 2016 15:52:21 +1100 |
parents | fcac5dbbf9ed |
children | 40de9f8f23a6 |
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-mat.cc Sun Feb 14 13:48:06 2016 -0800 +++ b/libinterp/parse-tree/pt-mat.cc Tue Jan 26 15:52:21 2016 +1100 @@ -427,7 +427,10 @@ { elt_changed = true; - *p = Cell (*p); + if (p->is_empty ()) + *p = Cell (); + else + *p = Cell (*p); } } @@ -1383,5 +1386,7 @@ %! string_fill_char (orig_val); %! assert (string_fill_char (), orig_val); +%!assert ( [ [], {1} ], {1} ) + %!error (string_fill_char (1, 2)) */