diff options
| author | gingerBill <bill@gingerbill.org> | 2020-11-17 12:19:28 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-11-17 12:19:28 +0000 |
| commit | fea8c63ab3168728c4b7d8c432bbb2eb41069100 (patch) | |
| tree | e3aa36cd44940ce699013a79b7fbce6064040ddc /src/string.cpp | |
| parent | 6f71d1f2a97887d7039c4e4cc39477a1f474ccae (diff) | |
Fix string_compare
Diffstat (limited to 'src/string.cpp')
| -rw-r--r-- | src/string.cpp | 1 |
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; } |