Mercurial > octave-libgccjit
comparison src/DLD-FUNCTIONS/lookup.cc @ 8646:e01c6355304f
fix string lookup in empty cells
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Fri, 30 Jan 2009 21:17:13 +0100 |
parents | 4b26e9fbbb37 |
children | de16ebeef93d |
comparison
equal
deleted
inserted
replaced
8645:579f1f54cc3a | 8646:e01c6355304f |
---|---|
257 ov_str_comp = ov_str_less; | 257 ov_str_comp = ov_str_less; |
258 } | 258 } |
259 | 259 |
260 | 260 |
261 // query just the first cell to verify it's a string | 261 // query just the first cell to verify it's a string |
262 if (table(0).is_string ()) | 262 if (table.is_empty () || table(0).is_string ()) |
263 { | 263 { |
264 if (argy.is_cell ()) | 264 if (argy.is_cell ()) |
265 { | 265 { |
266 Cell y = argy.cell_value (); | 266 Cell y = argy.cell_value (); |
267 ArrayN<octave_idx_type> idx (y.dims ()); | 267 ArrayN<octave_idx_type> idx (y.dims ()); |