# HG changeset patch # User abdelrahman@abdo # Date 1585377836 -7200 # Sat Mar 28 08:43:56 2020 +0200 # Node ID 3b6c4785624857e5b77d7ab3110e008c7d7bd34b # Parent 0edc9ae86a0f228ea808f901edd5c22844dfb952 maint:in strfind.cc:in strrep section in if string condition convert char array to cell string (bug#57867) diff -r 0edc9ae86a0f -r 3b6c47856248 strfind.cc --- a/strfind.cc Sat Mar 28 08:27:36 2020 +0200 +++ b/strfind.cc Sat Mar 28 08:43:56 2020 +0200 @@ -373,7 +373,7 @@ @result{} @{ [1,1] = Hello Jane - + [1,2] = Goodbye Jane @} @@ -417,8 +417,7 @@ qs_preprocess (pat, table); if (argstr.is_string ()) - if (argstr.is_string ()) - { + { const Cell argsc = argstr.cellstr_value(); Cell retc (argsc.dims ()); octave_idx_type ns = argsc.numel (); @@ -433,6 +432,7 @@ } retval = retc; } + else if (argstr.iscell ()) { const Cell argsc = argstr.cell_value ();