mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 792001 followup - Pass jschar to hasUnit/getUnit. r=pierron on IRC
This commit is contained in:
parent
fcd86f137d
commit
4f82ddcd0a
@ -332,12 +332,11 @@ ArrayShiftDense(JSContext *cx, HandleObject obj, MutableHandleValue rval)
|
|||||||
JSFixedString *
|
JSFixedString *
|
||||||
StringFromCharCode(JSContext *cx, int32_t code)
|
StringFromCharCode(JSContext *cx, int32_t code)
|
||||||
{
|
{
|
||||||
code = uint16_t(code);
|
|
||||||
|
|
||||||
if (StaticStrings::hasUnit(code))
|
|
||||||
return cx->runtime->staticStrings.getUnit(code);
|
|
||||||
|
|
||||||
jschar c = jschar(code);
|
jschar c = jschar(code);
|
||||||
|
|
||||||
|
if (StaticStrings::hasUnit(c))
|
||||||
|
return cx->runtime->staticStrings.getUnit(c);
|
||||||
|
|
||||||
return js_NewStringCopyN(cx, &c, 1);
|
return js_NewStringCopyN(cx, &c, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user