浏览代码

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 年之前
父节点
当前提交
959701208b
共有 1 个文件被更改,包括 1 次插入1 次删除
  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");
    }