Fixed bug when DEBUG is defined. Should this be applied to YaSp?
Peter Senna Tschudin [Fri, 24 May 2013 09:33:21 +0000 (11:33 +0200)]
scilab/modules/core/src/cpp/scilab.cpp

index 51456bb..81aeacf 100644 (file)
@@ -386,7 +386,9 @@ static int get_option(const int argc, char *argv[], int *_piFileIndex, int *_piL
     }
 
 #ifdef DEBUG
-    std::cerr << "File : " << argv[*_piFileIndex] << std::endl;
+    if (*_piFileIndex >= 0) {
+        std::cerr << "File : " << argv[*_piFileIndex] << std::endl;
+    }
 #endif
 
     ConfigVariable::setCommandLineArgs(argc, argv);