Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9dd50eae
Commit
9dd50eae
authored
Aug 08, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Allow 0x strings with explicit radix 16 in parseInt.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
58dd9c2b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
global.c
dlls/jscript/global.c
+2
-0
api.js
dlls/jscript/tests/api.js
+6
-0
No files found.
dlls/jscript/global.c
View file @
9dd50eae
...
...
@@ -336,6 +336,8 @@ static HRESULT JSGlobal_parseInt(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
}
else
{
radix
=
10
;
}
}
else
if
(
radix
==
16
&&
*
ptr
==
'0'
&&
(
ptr
[
1
]
==
'x'
||
ptr
[
1
]
==
'X'
))
{
ptr
+=
2
;
}
i
=
char_to_int
(
*
ptr
++
);
...
...
dlls/jscript/tests/api.js
View file @
9dd50eae
...
...
@@ -156,6 +156,12 @@ i = parseInt("1", 37);
ok
(
isNaN
(
i
),
"parseInt('1', 37) = "
+
i
);
i
=
parseInt
(
"1"
,
36
);
ok
(
i
===
1
,
"parseInt('1', 36) = "
+
i
);
i
=
parseInt
(
"0x1f"
,
16
);
ok
(
i
===
31
,
"parseInt('0xf', 16) = "
+
i
);
i
=
parseInt
(
"0x"
,
16
);
ok
(
isNaN
(
i
),
"parseInt('0x', 16) = "
+
i
);
i
=
parseInt
(
"0x1f"
,
17
);
ok
(
i
===
0
,
"parseInt('0xf', 16) = "
+
i
);
tmp
=
encodeURI
(
"abc"
);
ok
(
tmp
===
"abc"
,
"encodeURI('abc') = "
+
tmp
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment