Sfoglia il codice sorgente

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

LuisAntonRebollo 11 anni fa
parent
commit
32a73f9eb2
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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)
 {
-   if( src == NULL && !*src )
+   if( src == NULL || !*src )
       return *this;
 
    // Append the given string into a new string