1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-29 09:50:27 +00:00

Fix number parsing.

This commit is contained in:
Calvin Rose 2018-09-06 14:12:10 -04:00
parent c8ef2a0d88
commit 2a907f8290
2 changed files with 2 additions and 1 deletions

View File

@ -199,6 +199,7 @@ static struct JanetScanRes janet_scan_impl(
res.foundexp = 1;
break;
} else if (!gotradix && (*str == 'x' || *str == 'X')) {
if (!seenadigit) goto error;
if (res.seenpoint || res.mant > 0) goto error;
res.base = 16;
res.mant = 0;

View File

@ -1333,7 +1333,7 @@ int janet_init(void) {
* a collection pretty much every cycle, which is
* incredibly horrible for performance, but can help ensure
* there are no memory bugs during development */
janet_vm_gc_interval = 0x10000;
janet_vm_gc_interval = 0x1000000;
janet_symcache_init();
/* Initialize gc roots */
janet_vm_roots = NULL;