From fea8c63ab3168728c4b7d8c432bbb2eb41069100 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Tue, 17 Nov 2020 12:19:28 +0000 Subject: Fix string_compare --- src/string.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/string.cpp') 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; } -- cgit v1.2.3