From b6948ad9afd3e2e9bc782e25bee4209f19d275de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Foucault?= Date: Sun, 23 Jun 2019 18:00:29 +0200 Subject: [PATCH] Replace le and ge by lt and gt in compare_strings to have the excepted behavior of the function --- builtin/string.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/string.v b/builtin/string.v index 1c79ff4cac..aa92196ba0 100644 --- a/builtin/string.v +++ b/builtin/string.v @@ -568,10 +568,10 @@ fn (s string) trim_right(cutset string) string { // //C.printf("tid = %08x \n", pthread_self()); // } fn compare_strings(a, b *string) int { - if a.le(b) { + if a.lt(b) { return -1 } - if a.ge(b) { + if a.gt(b) { return 1 } return 0