Skip to content

Commit

Permalink
JS: Fix to_string() with negative numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Mar 17, 2024
1 parent d63a07f commit ff2aa9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion applications/system/js_app/js_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static void js_require(struct mjs* mjs) {
}

static void js_global_to_string(struct mjs* mjs) {
double num = mjs_get_int(mjs, mjs_arg(mjs, 0));
double num = mjs_get_double(mjs, mjs_arg(mjs, 0));
char tmp_str[] = "-2147483648";
itoa(num, tmp_str, 10);
mjs_val_t ret = mjs_mk_string(mjs, tmp_str, ~0, true);
Expand Down

0 comments on commit ff2aa9b

Please sign in to comment.