2
0
Эх сурвалжийг харах

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 8 жил өмнө
parent
commit
959701208b

+ 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"
    "@return True if the splash window could be successfully initialized.\n\n"
    "@ingroup Platform" )
    "@ingroup Platform" )
 {
 {
-   if (path == "")
+   if (path == NULL || *path == '\0')
    {
    {
       path = Con::getVariable("$Core::splashWindowImage");
       path = Con::getVariable("$Core::splashWindowImage");
    }
    }