Skip to content

Commit

Permalink
avoid possible crash
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Oct 13, 2024
1 parent fa5479e commit 0dd1c17
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0dd1c17

Please sign in to comment.