aboutsummaryrefslogtreecommitdiff
path: root/src/string.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-11-17 12:19:28 +0000
committergingerBill <bill@gingerbill.org>2020-11-17 12:19:28 +0000
commitfea8c63ab3168728c4b7d8c432bbb2eb41069100 (patch)
treee3aa36cd44940ce699013a79b7fbce6064040ddc /src/string.cpp
parent6f71d1f2a97887d7039c4e4cc39477a1f474ccae (diff)
Fix string_compare
Diffstat (limited to 'src/string.cpp')
-rw-r--r--src/string.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/string.cpp b/src/string.cpp
index 6a0192507..408f53d72 100644
--- a/src/string.cpp
+++ b/src/string.cpp
@@ -164,6 +164,7 @@ int string_compare(String const &x, String const &y) {
return cast(int)x[offset] - cast(int)y[offset];
}
}
+ return cast(int)(x.len - y.len);
}
return 0;
}