Parcourir la source

Always stop after null character

Kajetan Johannes Hammerle il y a 1 an
Parent
commit
e3e76a1a90
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      include/core/utils/ArrayString.hpp

+ 2 - 2
include/core/utils/ArrayString.hpp

@@ -33,8 +33,8 @@ namespace Core {
 
         bool operator==(const CharType* s) const {
             for(int i = 0; i < length; i++, s++) {
-                if(*s == '\0' && *s != data[i]) {
-                    return false;
+                if(*s == '\0') {
+                    return *s == data[i];
                 }
             }
             return *s == '\0';