aboutsummaryrefslogtreecommitdiffstats
path: root/include/json.h
diff options
context:
space:
mode:
authoripknHama <ipknhama@gmail.com>2014-11-09 08:47:45 +0900
committeripknHama <ipknhama@gmail.com>2014-11-09 08:52:23 +0900
commitf52778f04ddd0899374ce24bc36964181f67cbaa (patch)
treeb40e2b044deafbfd2c9a5370bd835b38d02f30d4 /include/json.h
parent49cad23ac917ac905fea2b16c0a4d63652aca2d9 (diff)
downloadcrow-f52778f04ddd0899374ce24bc36964181f67cbaa.tar.gz
crow-f52778f04ddd0899374ce24bc36964181f67cbaa.zip
Fixes a bug that crow::json failed to parse double value starting with 0
Diffstat (limited to 'include/json.h')
-rw-r--r--include/json.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/json.h b/include/json.h
index 91d4fe7..4fe03a7 100644
--- a/include/json.h
+++ b/include/json.h
@@ -824,9 +824,9 @@ namespace crow
return {};*/
break;
case '.':
- state = (NumberParsingState)"\7\7\7\4\7\7\7"[state];
+ state = (NumberParsingState)"\7\7\4\4\7\7\7"[state];
/*
- if (state == NumberParsingState::Digits)
+ if (state == NumberParsingState::Digits || state == NumberParsingState::ZeroFirst)
{
state = NumberParsingState::DigitsAfterPoints;
}