Explorar o código

Minor fix to `string_compare`

gingerBill %!s(int64=2) %!d(string=hai) anos
pai
achega
48a64a2c88
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/string.cpp

+ 1 - 1
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;