Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
6b7f3464
Commit
6b7f3464
authored
Jul 01, 2014
by
Philipp A. Hartmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ParseErrorCode: fix typo (NumberTooBig)
parent
a22f325a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
en.h
include/rapidjson/error/en.h
+1
-1
reader.h
include/rapidjson/reader.h
+3
-3
readertest.cpp
test/unittest/readertest.cpp
+2
-2
No files found.
include/rapidjson/error/en.h
View file @
6b7f3464
...
...
@@ -34,7 +34,7 @@ inline const RAPIDJSON_ERROR_CHARTYPE* GetParseError_En(ParseErrorCode parseErro
case
kParseErrorStringMissQuotationMark
:
return
RAPIDJSON_ERROR_STRING
(
"Missing a closing quotation mark in string."
);
case
kParseErrorStringInvalidEncoding
:
return
RAPIDJSON_ERROR_STRING
(
"Invalid encoidng in string."
);
case
kPar
es
ErrorNumberTooBig
:
return
RAPIDJSON_ERROR_STRING
(
"Number too big to be stored in double."
);
case
kPar
se
ErrorNumberTooBig
:
return
RAPIDJSON_ERROR_STRING
(
"Number too big to be stored in double."
);
case
kParseErrorNumberMissFraction
:
return
RAPIDJSON_ERROR_STRING
(
"Miss fraction part in number."
);
case
kParseErrorNumberMissExponent
:
return
RAPIDJSON_ERROR_STRING
(
"Miss exponent in number."
);
...
...
include/rapidjson/reader.h
View file @
6b7f3464
...
...
@@ -71,7 +71,7 @@ enum ParseErrorCode {
kParseErrorStringMissQuotationMark
,
//!< Missing a closing quotation mark in string.
kParseErrorStringInvalidEncoding
,
//!< Invalid encoidng in string.
kPar
es
ErrorNumberTooBig
,
//!< Number too big to be stored in double.
kPar
se
ErrorNumberTooBig
,
//!< Number too big to be stored in double.
kParseErrorNumberMissFraction
,
//!< Miss fraction part in number.
kParseErrorNumberMissExponent
//!< Miss exponent in number.
};
...
...
@@ -643,7 +643,7 @@ private:
d
=
(
double
)
i64
;
while
(
s
.
Peek
()
>=
'0'
&&
s
.
Peek
()
<=
'9'
)
{
if
(
d
>=
1E307
)
RAPIDJSON_PARSE_ERROR
(
kPar
es
ErrorNumberTooBig
,
is
.
Tell
());
RAPIDJSON_PARSE_ERROR
(
kPar
se
ErrorNumberTooBig
,
is
.
Tell
());
d
=
d
*
10
+
(
s
.
Take
()
-
'0'
);
}
}
...
...
@@ -695,7 +695,7 @@ private:
while
(
s
.
Peek
()
>=
'0'
&&
s
.
Peek
()
<=
'9'
)
{
exp
=
exp
*
10
+
(
s
.
Take
()
-
'0'
);
if
(
exp
>
308
)
RAPIDJSON_PARSE_ERROR
(
kPar
es
ErrorNumberTooBig
,
is
.
Tell
());
RAPIDJSON_PARSE_ERROR
(
kPar
se
ErrorNumberTooBig
,
is
.
Tell
());
}
}
else
...
...
test/unittest/readertest.cpp
View file @
6b7f3464
...
...
@@ -171,9 +171,9 @@ TEST(Reader, ParseNumber_Error) {
for
(
int
i
=
1
;
i
<
310
;
i
++
)
n1e309
[
i
]
=
'0'
;
n1e309
[
310
]
=
'\0'
;
TEST_NUMBER_ERROR
(
kPar
es
ErrorNumberTooBig
,
n1e309
);
TEST_NUMBER_ERROR
(
kPar
se
ErrorNumberTooBig
,
n1e309
);
}
TEST_NUMBER_ERROR
(
kPar
es
ErrorNumberTooBig
,
"1e309"
);
TEST_NUMBER_ERROR
(
kPar
se
ErrorNumberTooBig
,
"1e309"
);
// Miss fraction part in number.
TEST_NUMBER_ERROR
(
kParseErrorNumberMissFraction
,
"1."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment