mirror of
https://github.com/KarolS/millfork.git
synced 2024-10-31 14:04:58 +00:00
Fix for volatile fields
This commit is contained in:
parent
431a25d325
commit
da862069a7
4
src/main/scala/millfork/env/Constant.scala
vendored
4
src/main/scala/millfork/env/Constant.scala
vendored
@ -221,7 +221,7 @@ case class StructureConstant(typ: StructType, fields: List[Constant]) extends Co
|
||||
|
||||
override def subbyte(index: Int): Constant = {
|
||||
var offset = 0
|
||||
for ((fv, ResolvedFieldDesc(ft, _, arrayIndexTypeAndSize)) <- fields.zip(typ.mutableFieldsWithTypes)) {
|
||||
for ((fv, ResolvedFieldDesc(ft, _, _, arrayIndexTypeAndSize)) <- fields.zip(typ.mutableFieldsWithTypes)) {
|
||||
// TODO: handle array members?
|
||||
val fs = ft.size
|
||||
if (index < offset + fs) {
|
||||
@ -234,7 +234,7 @@ case class StructureConstant(typ: StructType, fields: List[Constant]) extends Co
|
||||
}
|
||||
override def subbyteBe(index: Int, totalSize: Int): Constant = {
|
||||
var offset = 0
|
||||
for ((fv, ResolvedFieldDesc(ft, _, arrayIndexTypeAndSize)) <- fields.zip(typ.mutableFieldsWithTypes)) {
|
||||
for ((fv, ResolvedFieldDesc(ft, _, _, arrayIndexTypeAndSize)) <- fields.zip(typ.mutableFieldsWithTypes)) {
|
||||
// TODO: handle array members?
|
||||
val fs = ft.size
|
||||
if (index < offset + fs) {
|
||||
|
Loading…
Reference in New Issue
Block a user