Skip to content

Commit

Permalink
[x86/Linux] Fix COMNumber::DoubleToNumberFC arguments order (dotnet#1…
Browse files Browse the repository at this point in the history
…7412)

We should use FCDECL3_VII/FCIMPL3_VII instead of FCDECL3/FCIMPL3
otherwise we got incorrect order of arguments that leads to crashes.
  • Loading branch information
Konstantin Baladurin authored and janvorli committed Apr 4, 2018
1 parent d1f49cc commit fe44fe6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/classlibnative/bcltype/number.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1983,7 +1983,7 @@ STRINGREF NumberToStringFormat(NUMBER* number, STRINGREF str, NUMFMTREF numfmt)
#pragma warning(pop)
#endif

FCIMPL3(void, COMNumber::DoubleToNumberFC, double value, int precision, NUMBER* number)
FCIMPL3_VII(void, COMNumber::DoubleToNumberFC, double value, int precision, NUMBER* number)
{
FCALL_CONTRACT;

Expand Down
2 changes: 1 addition & 1 deletion src/classlibnative/bcltype/number.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct NUMBER {
class COMNumber
{
public:
static FCDECL3(void, DoubleToNumberFC, double value, int precision, NUMBER* number);
static FCDECL3_VII(void, DoubleToNumberFC, double value, int precision, NUMBER* number);
static FCDECL1(double, NumberToDoubleFC, NUMBER* number);
static FCDECL2(FC_BOOL_RET, NumberBufferToDecimal, NUMBER* number, DECIMAL* value);

Expand Down

0 comments on commit fe44fe6

Please sign in to comment.