# HG changeset patch # User Philip Nienhuis # Date 1388660091 -3600 # Node ID f80d258a2c7d6ccdf95ce69b924268f6c949e747 # Parent ab775508dff9d54266e5cb8f965201298a11d66f get_first_help_sentence.m: avoid out-of-bound error (bug #41053) * get_first_help_sentence.m: avoid out-of-bound error (bug #41053) diff -r ab775508dff9 -r f80d258a2c7d scripts/help/get_first_help_sentence.m --- a/scripts/help/get_first_help_sentence.m Wed Jan 01 08:43:43 2014 -0500 +++ b/scripts/help/get_first_help_sentence.m Thu Jan 02 11:54:51 2014 +0100 @@ -124,11 +124,11 @@ sep_idx = min (space_idx, bracket_idx); def_type = help_text(def1+1:sep_idx-1); - end_idx = strfind (help_text, sprintf ("@end %s", def_type))(1); + end_idx = strfind (help_text, sprintf ("@end %s", def_type)); if (isempty (end_idx)) error ("get_first_help_sentence: couldn't parse texinfo"); endif - keep(end_idx:end) = false; + keep(end_idx(1):end) = false; help_text = help_text(keep); endif