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
519a899f
Commit
519a899f
authored
Apr 11, 2015
by
Milo Yip
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #296 from miloyip/issue294_WriteIntSegFault
Try to fix a potential seg fault on some compiler
parents
6f4337c5
e346b933
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
itoa.h
include/rapidjson/internal/itoa.h
+6
-4
No files found.
include/rapidjson/internal/itoa.h
View file @
519a899f
...
...
@@ -109,12 +109,13 @@ inline char* u32toa(uint32_t value, char* buffer) {
}
inline
char
*
i32toa
(
int32_t
value
,
char
*
buffer
)
{
uint32_t
u
=
static_cast
<
uint32_t
>
(
value
);
if
(
value
<
0
)
{
*
buffer
++
=
'-'
;
value
=
-
value
;
u
=
~
u
+
1
;
}
return
u32toa
(
static_cast
<
uint32_t
>
(
value
)
,
buffer
);
return
u32toa
(
u
,
buffer
);
}
inline
char
*
u64toa
(
uint64_t
value
,
char
*
buffer
)
{
...
...
@@ -286,12 +287,13 @@ inline char* u64toa(uint64_t value, char* buffer) {
}
inline
char
*
i64toa
(
int64_t
value
,
char
*
buffer
)
{
uint64_t
u
=
static_cast
<
uint64_t
>
(
value
);
if
(
value
<
0
)
{
*
buffer
++
=
'-'
;
value
=
-
value
;
u
=
~
u
+
1
;
}
return
u64toa
(
static_cast
<
uint64_t
>
(
value
)
,
buffer
);
return
u64toa
(
u
,
buffer
);
}
}
// namespace internal
...
...
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