[nemiver] Don't quote empty arguments passed to the inferior



commit bf56c2adfc02ea64cbe38013bd852cd3474e09fb
Author: Dodji Seketeli <dodji redhat com>
Date:   Mon Apr 20 13:29:35 2009 +0200

    Don't quote empty arguments passed to the inferior
    
    	* src/dbgengine/nmv-gdb-engine.cc (quote_args): Don't quote empty
    	arguments. Otherwise, that can really change the behaviour of the
    	inferior that would now see one more argument on its command line.
---
 src/dbgengine/nmv-gdb-engine.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index 64128cd..81d22c3 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -63,7 +63,8 @@ quote_args (const vector<UString> &a_prog_args)
         for (vector<UString>::size_type i=1;
              i < a_prog_args.size ();
              ++i) {
-            args += Glib::shell_quote (a_prog_args[i].raw ()) + " ";
+            if (!a_prog_args[i].empty ())
+                args += Glib::shell_quote (a_prog_args[i].raw ()) + " ";
         }
     }
     return args;



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