1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-18 18:07:35 +00:00

fixes for updated typescript

This commit is contained in:
Steven Hugg 2023-09-12 21:57:08 -05:00
parent ac9c14351f
commit 0bf41a39c7

View File

@ -1116,7 +1116,7 @@ export class BASICParser {
for (var arrdim of arr.args) {
if (arrdim.valtype != 'number')
this.compileError(`Array dimensions must be numeric.`, arrdim.$loc);
if (isLiteral(arrdim) && arrdim.value < this.opts.defaultArrayBase)
if (isLiteral(arrdim) && typeof arrdim.value === 'number' && arrdim.value < this.opts.defaultArrayBase)
this.compileError(`An array dimension cannot be less than ${this.opts.defaultArrayBase}.`, arrdim.$loc);
}
});