Mercurial > hg > octave-terminal
changeset 4244:189df16144fc
[project @ 2002-12-28 02:00:05 by jwe]
author | jwe |
---|---|
date | Sat, 28 Dec 2002 02:00:05 +0000 |
parents | 7e4d5b5520e5 |
children | 610671be8792 |
files | src/parse.y |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parse.y +++ b/src/parse.y @@ -3376,7 +3376,7 @@ std::string nm = sym_rec->name (); - static string_vector names (2); + string_vector names (2); names[0] = nm + ".oct"; names[1] = nm + ".m"; @@ -3387,12 +3387,12 @@ int len = file.length (); - if (file.substr (len-4, len-1) == ".oct") + if (len > 4 && file.substr (len-4, len-1) == ".oct") { if (octave_dynamic_loader::load (nm, file)) force_link_to_function (nm); } - else + else if (len > 2) { // These are needed by yyparse. @@ -3404,8 +3404,7 @@ curr_fcn_file_name = nm; curr_fcn_file_full_name = file; - if (file.length () > 0) - script_file_executed = parse_fcn_file (file, exec_script); + script_file_executed = parse_fcn_file (file, exec_script); if (! (error_state || script_file_executed)) force_link_to_function (nm);