aboutsummaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-18 16:48:11 +0000
committergingerBill <bill@gingerbill.org>2023-01-18 16:48:11 +0000
commit48a64a2c88fd07da1a09de76ae319814c0149c6b (patch)
tree617c897c001ad32143b6a68ce25ffe83133ef1b0 /src/string.cpp
parent7f3795a231f96690a7668a61ce71420025306970 (diff)
Minor fix to `string_compare`
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.cpp b/src/string.cpp
index af6c437e1..6eac4f53b 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -108,7 +108,7 @@ gb_internal void string_to_lower(String *s) {
gb_internal int string_compare(String const &a, String const &b) {
if (a.text == b.text) {
- return 0;
+ return cast(int)(a.len - b.len);
}
if (a.text == nullptr) {
return -1;