changeset 11892:4364e3fab451
release-3-0-x
fix empty matrix handling in switch statement
author |
Jaroslav Hajek <highegg@gmail.com> |
date |
Mon, 08 Dec 2008 06:48:27 +0100 |
parents |
177611afa7c1 |
children |
4ccdb0d32158 |
files |
src/ChangeLog src/pt-select.cc |
diffstat |
2 files changed, 5 insertions(+), 1 deletions(-)
[+]
|
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-08 Jaroslav Hajek <highegg@gmail.com>
+
+ * pt-select.cc (equal): Make empty matrices match.
+
2008-11-12 David Bateman <dbateman@free.fr>
* OPERATORS/op-cell.cc (op_catop_matrix_cell): Cast args in the correct
--- a/src/pt-select.cc
+++ b/src/pt-select.cc
@@ -168,7 +168,7 @@
octave_value tmp = do_binary_op (octave_value::op_eq, val, test);
if (! error_state && tmp.is_defined ())
- retval = tmp.is_true ();
+ retval = tmp.is_true () || tmp.is_empty ();
}
return retval;