Skip to content

Commit 08be15d

Browse files
committed
In JavaScriptEngineSwitcher.ChakraCore fixed a error #82 “Program crash after function call with too much parameters”
1 parent eeb55d7 commit 08be15d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Diff for: src/JavaScriptEngineSwitcher.ChakraCore/Helpers/ReflectionHelpers.cs

+6
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,15 @@ public static void FixPropertyValueType(ref object value, PropertyInfo property)
8686
public static void FixArgumentTypes(ref object[] argValues, ParameterInfo[] parameters)
8787
{
8888
int argCount = argValues.Length;
89+
int parameterCount = parameters.Length;
8990

9091
for (int argIndex = 0; argIndex < argCount; argIndex++)
9192
{
93+
if (argIndex >= parameterCount)
94+
{
95+
break;
96+
}
97+
9298
object argValue = argValues[argIndex];
9399
if (argValue == null)
94100
{

Diff for: src/JavaScriptEngineSwitcher.ChakraCore/JavaScriptEngineSwitcher.ChakraCore.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This package does not contain the native implementations of ChakraCore. Therefor
2222
* JavaScriptEngineSwitcher.ChakraCore.Native.osx-x64</Description>
2323
<PackageIcon>icon.png</PackageIcon>
2424
<PackageTags>JavaScriptEngineSwitcher;JavaScript;ECMAScript;ChakraCore</PackageTags>
25-
<PackageReleaseNotes>ChakraCore was updated to version 1.11.16.</PackageReleaseNotes>
25+
<PackageReleaseNotes>Fixed a error #82 “Program crash after function call with too much parameters”.</PackageReleaseNotes>
2626
</PropertyGroup>
2727

2828
<Import Project="../../build/common.props" />

Diff for: src/JavaScriptEngineSwitcher.ChakraCore/readme.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
=============
3131
RELEASE NOTES
3232
=============
33-
ChakraCore was updated to version 1.11.16.
33+
Fixed a error #82 “Program crash after function call with too much parameters”.
3434

3535
=============
3636
DOCUMENTATION

0 commit comments

Comments
 (0)