Procházet zdrojové kódy

Fix Dereference of null pointer on String::operator+=.

LuisAntonRebollo před 11 roky
rodič
revize
32a73f9eb2
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Engine/source/core/util/str.cpp

+ 1 - 1
Engine/source/core/util/str.cpp

@@ -760,7 +760,7 @@ String& String::operator=(const String &src)
 
 
 String& String::operator+=(const StringChar *src)
 String& String::operator+=(const StringChar *src)
 {
 {
-   if( src == NULL && !*src )
+   if( src == NULL || !*src )
       return *this;
       return *this;
 
 
    // Append the given string into a new string
    // Append the given string into a new string