File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ bool StringEqualNoCase(const char* a, const char* b) {
300
300
if (*a == ' \0 ' )
301
301
return *b == ' \0 ' ;
302
302
if (*b == ' \0 ' )
303
- return *a == ' \0 ' ;
303
+ return false ;
304
304
} while (ToLower (*a++) == ToLower (*b++));
305
305
return false ;
306
306
}
@@ -533,9 +533,9 @@ inline bool IsSafeJsInt(v8::Local<v8::Value> v) {
533
533
constexpr size_t FastStringKey::HashImpl (const char * str) {
534
534
// Low-quality hash (djb2), but just fine for current use cases.
535
535
size_t h = 5381 ;
536
- do {
537
- h = h * 33 + *str; // NOLINT(readability/pointer_notation)
538
- } while (*(str++) != ' \0 ' );
536
+ while (*str != ' \0 ' ) {
537
+ h = h * 33 + *( str++) ; // NOLINT(readability/pointer_notation)
538
+ }
539
539
return h;
540
540
}
541
541
@@ -551,7 +551,7 @@ constexpr bool FastStringKey::operator==(const FastStringKey& other) const {
551
551
do {
552
552
if (*(p1++) != *(p2++)) return false ;
553
553
} while (*p1 != ' \0 ' );
554
- return true ;
554
+ return *p2 == ' \0 ' ;
555
555
}
556
556
557
557
constexpr FastStringKey::FastStringKey (const char * name)
You can’t perform that action at this time.
0 commit comments