From cc8097955dd44915c569e2c094f5e08be7b4c6e4 Mon Sep 17 00:00:00 2001 From: Ding Li Date: Sun, 10 Sep 2023 01:20:48 +0800 Subject: [PATCH] Update Json.mqh Fix #57: fix number sign problem in `Format/Json.mqh` --- Format/Json.mqh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Format/Json.mqh b/Format/Json.mqh index b38b157..e574d9b 100644 --- a/Format/Json.mqh +++ b/Format/Json.mqh @@ -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"; @@ -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(); @@ -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