mirror of
https://github.com/janet-lang/janet
synced 2024-11-29 03:19:54 +00:00
Fix number parsing.
This commit is contained in:
parent
c8ef2a0d88
commit
2a907f8290
@ -199,6 +199,7 @@ static struct JanetScanRes janet_scan_impl(
|
|||||||
res.foundexp = 1;
|
res.foundexp = 1;
|
||||||
break;
|
break;
|
||||||
} else if (!gotradix && (*str == 'x' || *str == 'X')) {
|
} else if (!gotradix && (*str == 'x' || *str == 'X')) {
|
||||||
|
if (!seenadigit) goto error;
|
||||||
if (res.seenpoint || res.mant > 0) goto error;
|
if (res.seenpoint || res.mant > 0) goto error;
|
||||||
res.base = 16;
|
res.base = 16;
|
||||||
res.mant = 0;
|
res.mant = 0;
|
||||||
|
@ -1333,7 +1333,7 @@ int janet_init(void) {
|
|||||||
* a collection pretty much every cycle, which is
|
* a collection pretty much every cycle, which is
|
||||||
* incredibly horrible for performance, but can help ensure
|
* incredibly horrible for performance, but can help ensure
|
||||||
* there are no memory bugs during development */
|
* there are no memory bugs during development */
|
||||||
janet_vm_gc_interval = 0x10000;
|
janet_vm_gc_interval = 0x1000000;
|
||||||
janet_symcache_init();
|
janet_symcache_init();
|
||||||
/* Initialize gc roots */
|
/* Initialize gc roots */
|
||||||
janet_vm_roots = NULL;
|
janet_vm_roots = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user