changeset 8646:e01c6355304f

fix string lookup in empty cells
author Jaroslav Hajek <highegg@gmail.com>
date Fri, 30 Jan 2009 21:17:13 +0100
parents 579f1f54cc3a
children 06f5dd901f30
files src/ChangeLog src/DLD-FUNCTIONS/lookup.cc
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Jan 30 14:52:32 2009 -0500
+++ b/src/ChangeLog	Fri Jan 30 21:17:13 2009 +0100
@@ -1,3 +1,7 @@
+2009-01-30  Jaroslav Hajek  <highegg@gmail.com>
+
+	* DLD-FUNCTIONS/lookup.cc (Flookup): Add missing check.
+
 2009-01-29  John W. Eaton  <jwe@octave.org>
 
 	* pt-stmt.cc (tree_statement::eval): Check
--- a/src/DLD-FUNCTIONS/lookup.cc	Fri Jan 30 14:52:32 2009 -0500
+++ b/src/DLD-FUNCTIONS/lookup.cc	Fri Jan 30 21:17:13 2009 +0100
@@ -259,7 +259,7 @@
 
 
       // query just the first cell to verify it's a string
-      if (table(0).is_string ())
+      if (table.is_empty () || table(0).is_string ())
         {
           if (argy.is_cell ())
             {