aboutsummaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-03-18 17:32:26 +0000
committergingerBill <bill@gingerbill.org>2024-03-18 17:32:26 +0000
commit97be7feb99d4ff2b26cde0426c619e50bb0d758a (patch)
tree394eae6bd06afec37e4742494fb56accb3ccf9bd /src/string.cpp
parent00344e1323dc6d9baf09c26f31c409f26a0a1cca (diff)
Add list of C identifier suggestions (types and keywords)
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp
index f762dca40..8be40ec3c 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -106,6 +106,9 @@ gb_internal gb_inline bool str_eq_ignore_case(String const &a, String const &b)
template <isize N>
gb_internal gb_inline bool str_eq_ignore_case(String const &a, char const (&b_)[N]) {
+ if (a.len != N-1) {
+ return false;
+ }
String b = {cast(u8 *)b_, N-1};
return str_eq_ignore_case(a, b);
}