Skip to content

Commit 8a22812

Browse files
committed
Cleaning memset amd adding more tests.
1 parent 7296d4d commit 8a22812

6 files changed

Lines changed: 5 additions & 2 deletions

File tree

jsonchecker/pass06.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
true

jsonchecker/pass07.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
null

jsonchecker/pass08.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1

jsonchecker/pass09.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
false

jsonchecker/pass10.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"124"

src/stage34_unified.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ bool unified_machine(const u8 *buf, size_t len, ParsedJson &pj) {
157157
// this is done only for JSON documents made of a sole number
158158
char * copy = (char *) malloc(len + 1 + 64);
159159
if(copy == NULL) goto fail;
160-
//memset(copy, 0, len + 1 + 64);
161160
memcpy(copy, buf, len);
162161
copy[len] = '\0';
163162
if (!parse_number((const u8 *)copy, pj, idx, false)) {
@@ -172,7 +171,6 @@ bool unified_machine(const u8 *buf, size_t len, ParsedJson &pj) {
172171
// this is done only for JSON documents made of a sole number
173172
char * copy = (char *) malloc(len + 1 + 64);
174173
if(copy == NULL) goto fail;
175-
//memset(copy, 0, len + 1 + 64);
176174
memcpy(copy, buf, len);
177175
copy[len] = '\0';
178176
if (!parse_number((const u8 *)copy, pj, idx, true)) {

0 commit comments

Comments
 (0)