Explorar o código

Fixed V547: Bad C-string comparsion

This comparison of a string to an empty is meaningless, since in fact two pointers will be compared and the expression will always be false.
Phillip Khandeliants %!s(int64=8) %!d(string=hai) anos
pai
achega
959701208b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Engine/source/console/consoleFunctions.cpp

+ 1 - 1
Engine/source/console/consoleFunctions.cpp

@@ -2148,7 +2148,7 @@ DefineEngineFunction( displaySplashWindow, bool, (const char* path), (""),
    "@return True if the splash window could be successfully initialized.\n\n"
    "@ingroup Platform" )
 {
-   if (path == "")
+   if (path == NULL || *path == '\0')
    {
       path = Con::getVariable("$Core::splashWindowImage");
    }