# HG changeset patch # User John W. Eaton # Date 1346890940 14400 # Node ID b516da00c5e44e78f9dd42c6af2b8690d3ec660b # Parent ec3a9ff6c37529f81d56aa9674709bfda6fcc9ee don't insert unknonwn parameters in internal octave_config_info struct * toplev.cc (Foctave_config_info): Check that field exists before attempting to access contents. diff -r ec3a9ff6c375 -r b516da00c5e4 libinterp/interpfcn/toplev.cc --- a/libinterp/interpfcn/toplev.cc Wed Sep 05 16:59:19 2012 -0700 +++ b/libinterp/interpfcn/toplev.cc Wed Sep 05 20:22:20 2012 -0400 @@ -1474,12 +1474,17 @@ if (! error_state) { - Cell c = m.contents (arg.c_str ()); + if (m.isfield (arg)) + { + Cell c = m.contents (arg); - if (c.is_empty ()) - error ("octave_config_info: no info for `%s'", arg.c_str ()); + if (c.is_empty ()) + error ("octave_config_info: no info for `%s'", arg.c_str ()); + else + retval = c(0); + } else - retval = c(0); + error ("octave_config_info: invalid parameter `%s'", arg.c_str ()); } } else if (nargin == 0)