Browse Source

Fix: the string literal is implicitly casted to the bool type.

bank 11 years ago
parent
commit
e6673eaf30

+ 2 - 2
Engine/source/cinterface/c_scripting.cpp

@@ -222,7 +222,7 @@ extern "C" {
    {
       // maxArgs improper on a number of console function/methods
       if (argc < entry->mMinArgs)// || argc > entry->mMaxArgs)
-         return "";
+         return false;
 
       SimObject* o = NULL;
 
@@ -230,7 +230,7 @@ extern "C" {
       {
          o = Sim::findObject(dAtoi(argv[1]));
          if (!o)
-            return "";
+            return false;
       }
 
       return entry->cb.mBoolCallbackFunc(o, argc, argv);      

+ 1 - 1
Engine/source/cinterface/cinterface.cpp

@@ -303,7 +303,7 @@ extern "C" {
 		Namespace::Entry* entry = GetEntry(nameSpace, name);
 
 		if (!entry)
-			return "";
+			return false;
 
 		return entry->cb.mBoolCallbackFunc(NULL, argc, argv);      
 	}