mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 14:53:09 +00:00
[0.4.9][JSCRIPT] Fix regression CORE-13810 "Vypress Chat 2.1.9 MSI setup fatal error"
The regression was unhidden by MSI-winesync 1.5.10 almost 7years ago:8939969e21
== SVN r57070 Finally we can fix it by adding MS enumerator extension to Jscript. Many thanks to the patches author Andreas Maier <staubim@quantentunnel.de> JIRA-nick: andy-123 fix picked from commit 0.4.12-RC-18-g9ebb42a4c0
It went afterwards into master in slightly modified form as 0.4.13-dev-890-g83dcae1
But I decided to take the older state from 0.4.12RC, so that I do not have to risk touching releases/0.4.12 again to sync to "latest&greatest". Due to the changed PROPF_* defines in jscript.h, I felt most safe by porting back also: 0.4.10-dev-188-gc6f49f5
0.4.10-dev-152-g3f071cc
This commit is contained in:
parent
ead395d3ae
commit
a15d6418cf
20 changed files with 2307 additions and 1066 deletions
|
@ -659,11 +659,18 @@ HRESULT to_int32(script_ctx_t *ctx, jsval_t v, INT *ret)
|
|||
double n;
|
||||
HRESULT hres;
|
||||
|
||||
const double p32 = (double)0xffffffff + 1;
|
||||
|
||||
hres = to_number(ctx, v, &n);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
*ret = is_finite(n) ? n : 0;
|
||||
if(is_finite(n))
|
||||
n = n > 0 ? fmod(n, p32) : -fmod(-n, p32);
|
||||
else
|
||||
n = 0;
|
||||
|
||||
*ret = (UINT32)n;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue