octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51708] multiple --eval options results in cor


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #51708] multiple --eval options results in corrupted parsing of command line
Date: Wed, 9 Aug 2017 16:43:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #1, bug #51708 (project octave):

It was this changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/336f89b6208b


diff --git a/libinterp/octave.cc b/libinterp/octave.cc
--- a/libinterp/octave.cc
+++ b/libinterp/octave.cc
@@ -144,7 +144,7 @@ namespace octave
                 if (m_code_to_eval.empty ())
                   m_code_to_eval = octave_optarg_wrapper ();
                 else
-                  m_code_to_eval += std::string (" ") + octave_optarg_wrapper
();
+                  m_code_to_eval += ' ' + octave_optarg_wrapper ();
               }
             break;
 


octave_optarg_wrapper returns char*, not std::string, so adding that to ' ' is
trouble.

I haven't looked to see whether there are other places where similar problems
may have been introduced.

Adding Rik to the notification list.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51708>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]