Skip to content

Commit

Permalink
Update Json.mqh
Browse files Browse the repository at this point in the history
Fix #57: fix number sign problem in `Format/Json.mqh`
  • Loading branch information
dingmaotu committed Sep 9, 2023
1 parent 9639a49 commit cc80979
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Format/Json.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ public:
{
double value;
int sign,intValue;
bool r=parseInt(sign,intValue);
bool r=parseIntPart(sign,intValue);
if(!r)
{
m_error="error parsing number: invalid integer part";
Expand All @@ -489,7 +489,7 @@ public:
return new JsonNumber(value);
}

bool parseInt(int &sign,int &value)
bool parseIntPart(int &sign,int &value)
{
sign=1;
unichar c=m_stream.nextChar();
Expand All @@ -501,7 +501,7 @@ public:
value=0;
if(c=='0') // 0
{
sign=1;
// sign=1; // No need to change the `sign` as it will be used in parseNumber
return true;
}
else if(c<='9' && c>='1') // onenine 0..9
Expand Down

0 comments on commit cc80979

Please sign in to comment.