mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Fix string <.
This commit is contained in:
parent
d9bf640477
commit
941b505765
@ -234,7 +234,7 @@ static JSValue less_Default(const JSValue& r1, const JSValue& r2)
|
||||
JSValue rv = r2.toPrimitive(JSValue::Number);
|
||||
if (lv.isString() && rv.isString()) {
|
||||
// XXX FIXME urgh, call w_strcmp ??? on a JSString ???
|
||||
return JSValue(rv.string->compare(*lv.string));
|
||||
return JSValue(double(lv.string->compare(*rv.string) < 0));
|
||||
}
|
||||
else {
|
||||
lv = lv.toNumber();
|
||||
|
@ -234,7 +234,7 @@ static JSValue less_Default(const JSValue& r1, const JSValue& r2)
|
||||
JSValue rv = r2.toPrimitive(JSValue::Number);
|
||||
if (lv.isString() && rv.isString()) {
|
||||
// XXX FIXME urgh, call w_strcmp ??? on a JSString ???
|
||||
return JSValue(rv.string->compare(*lv.string));
|
||||
return JSValue(double(lv.string->compare(*rv.string) < 0));
|
||||
}
|
||||
else {
|
||||
lv = lv.toNumber();
|
||||
|
Loading…
Reference in New Issue
Block a user