mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Shortcut strncmp in string to number conversion path (513434, r=sayrer).
This commit is contained in:
parent
3ffdadab9b
commit
7a4da2ecd3
@ -1174,7 +1174,7 @@ js_strtod(JSContext *cx, const jschar *s, const jschar *send,
|
||||
istr = cstr;
|
||||
if ((negative = (*istr == '-')) != 0 || *istr == '+')
|
||||
istr++;
|
||||
if (!strncmp(istr, js_Infinity_str, sizeof js_Infinity_str - 1)) {
|
||||
if (*istr == 'I' && !strncmp(istr, js_Infinity_str, sizeof js_Infinity_str - 1)) {
|
||||
d = *(negative ? cx->runtime->jsNegativeInfinity : cx->runtime->jsPositiveInfinity);
|
||||
estr = istr + 8;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user