Browse Source

Always stop after null character

Kajetan Johannes Hammerle 11 months ago
parent
commit
e3e76a1a90
1 changed files with 2 additions and 2 deletions
  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';