mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-11 12:29:46 +00:00
Avoid overflow errors when estimating memset sizes
This commit is contained in:
parent
5dd3e91c2d
commit
5cdc599b1d
@ -227,9 +227,9 @@ abstract class AbstractStatementPreprocessor(protected val ctx: CompilationConte
|
|||||||
) {
|
) {
|
||||||
val sizeExpr = f.direction match {
|
val sizeExpr = f.direction match {
|
||||||
case ForDirection.DownTo =>
|
case ForDirection.DownTo =>
|
||||||
f.start #-# f.end #+# 1
|
f.start #-# f.end #+# LiteralExpression(1, 2)
|
||||||
case ForDirection.To | ForDirection.ParallelTo =>
|
case ForDirection.To | ForDirection.ParallelTo =>
|
||||||
f.end #-# f.start #+# 1
|
f.end #-# f.start #+# LiteralExpression(1, 2)
|
||||||
case ForDirection.Until | ForDirection.ParallelUntil =>
|
case ForDirection.Until | ForDirection.ParallelUntil =>
|
||||||
f.end #-# f.start
|
f.end #-# f.start
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user