From e581f254d04ca9c71f7af66ee202bef408c8255c Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 13 Mar 2019 03:48:58 +0100 Subject: [PATCH] fix --- std/assembly/util/sort.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/std/assembly/util/sort.ts b/std/assembly/util/sort.ts index db9e3048..40690d20 100644 --- a/std/assembly/util/sort.ts +++ b/std/assembly/util/sort.ts @@ -1,3 +1,5 @@ +import { compareImpl } from "./string"; + @inline export function COMPARATOR(): (a: T, b: T) => i32 { if (isInteger()) { if (isSigned() && sizeof() <= 4) { @@ -31,7 +33,7 @@ if (!alen && !blen) return 0; if (!alen) return -1; if (!blen) return 1; - return String.cmp(a, 0, b, 0, min(alen, blen)); + return compareImpl(a, 0, b, 0, min(alen, blen)); }; } else { return (a: T, b: T): i32 => ((a > b) - (a < b));