ccxvii / mujs

An embeddable Javascript interpreter in C.

Home Page:http://mujs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect integer parsing using strtol

klad-me opened this issue · comments

Large integers (64 bit) incorrectly parsing using strtol function on 32-bit systems.
strtol returns long (32-bit on 32-bit systems), so I think you should use storll that returns long long (64-bit on 32-bit systems).
Patch is very simple - jsbuildin.c for parseInt() and jsvalue.c for js_stringtofloat() and js_stringtonumber().
Thanks a lot !