mirror of
https://github.com/irmen/prog8.git
synced 2024-11-25 19:31:36 +00:00
avoid possible crash
This commit is contained in:
parent
fa5479ee5f
commit
0dd1c17ff4
@ -49,6 +49,8 @@ internal class LiteralsToAutoVars(private val program: Program, private val erro
|
||||
}
|
||||
} else {
|
||||
val arrayDt = array.guessDatatype(program)
|
||||
if(arrayDt.isUnknown)
|
||||
return noModifications
|
||||
val elementDt = ArrayToElementTypes.getValue(arrayDt.getOr(DataType.UNDEFINED))
|
||||
val maxSize = when(elementDt) {
|
||||
in ByteDatatypesWithBoolean -> PtContainmentCheck.MAX_SIZE_FOR_INLINE_CHECKS_BYTE
|
||||
|
Loading…
Reference in New Issue
Block a user