Fix .eql check on empty values

This commit is contained in:
Jarred Sumner
2023-03-07 23:29:07 -08:00
parent dec6c62968
commit f3cd2be68c

View File

@@ -159,6 +159,9 @@ pub const ZigString = extern struct {
}
pub fn eql(this: ZigString, other: ZigString) bool {
if (this.len == 0 or other.len == 0)
return this.len == other.len;
const left_utf16 = this.is16Bit();
const right_utf16 = other.is16Bit();