Segmentation fault in JSON.stringify()

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
This commit is contained in:
Roland Takacs 2015-07-15 14:49:54 +02:00 committed by Peter Gal
parent 2e0334ccb2
commit 336db40ed0
2 changed files with 4 additions and 1 deletions

View File

@ -150,7 +150,7 @@ list_remove_last_element (list_ctx_t *ctx_p) /**< list context */
{
return;
}
ctx_p->current_p = NULL;
*ctx_p->current_p = NULL;
ctx_p->current_p--;
} /* list_remove_last_element */

View File

@ -104,6 +104,9 @@ try {
object = {"a": 1, "b": [1, true, {"a": "foo"}]};
assert (JSON.stringify (object) == '{"b":[1,true,{"a":"foo"}],"a":1}');
object = {"a": [1], "b": {}};
assert (JSON.stringify(object) === '{"b":{},"a":[1]}');
array = [1, {"a": 2, "b": true, c: [3]}];
assert (JSON.stringify (array) == '[1,{"c":[3],"b":true,"a":2}]');