From 7112da24b8509aeab8227f11df51d983ddd706d0 Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Thu, 7 Nov 2024 11:02:59 +0100 Subject: [PATCH] Add compare of string with null --- hld/Eval.hx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hld/Eval.hx b/hld/Eval.hx index 72ff736..f4c0691 100644 --- a/hld/Eval.hx +++ b/hld/Eval.hx @@ -572,6 +572,8 @@ class Eval { return getPtr(a).sub(getPtr(b)); case [VString(as,_), VString(bs,_)]: return Reflect.compare(as, bs); + case [VString(_,_) | VNull, VString(_,_) | VNull]: + return b.v == VNull ? 1 : -1; case [VEnum(ac, avalues, _), VEnum(bc, bvalues, _)]: switch [a.t, b.t] { case [HEnum(aproto), HEnum(bproto)] if( aproto == bproto ):