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
b81e44f8
Commit
b81e44f8
authored
Apr 19, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Make parsing of double more accurate.
parent
6aafd2f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
global.c
dlls/jscript/global.c
+3
-1
lex.c
dlls/jscript/lex.c
+1
-1
No files found.
dlls/jscript/global.c
View file @
b81e44f8
...
...
@@ -621,7 +621,9 @@ static HRESULT JSGlobal_parseFloat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
}
V_VT
(
retv
)
=
VT_R8
;
V_R8
(
retv
)
=
(
double
)(
positive
?
d
:-
d
)
*
pow
(
10
,
exp
);
if
(
!
positive
)
d
=
-
d
;
V_R8
(
retv
)
=
(
exp
>
0
?
d
*
pow
(
10
,
exp
)
:
d
/
pow
(
10
,
-
exp
));
return
S_OK
;
}
...
...
dlls/jscript/lex.c
View file @
b81e44f8
...
...
@@ -474,7 +474,7 @@ static int parse_double_literal(parser_ctx_t *ctx, LONG int_part, literal_t **li
else
exp
+=
e
;
}
*
literal
=
new_double_literal
(
ctx
,
(
DOUBLE
)
d
*
pow
(
10
,
exp
));
*
literal
=
new_double_literal
(
ctx
,
exp
>=
0
?
d
*
pow
(
10
,
exp
)
:
d
/
pow
(
10
,
-
exp
));
return
tNumericLiteral
;
}
...
...
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