fix certain value copying through pointer dereferences

This commit is contained in:
Irmen de Jong committed 2026-03-16 00:10:47 +01:00
1 parent decfbfc8cc
commit 8be0cd3c19
6 files changed
+59 -15

No files matched your search

+1 -1
View File
@@ -212,7 +212,7 @@ class DataType private constructor(val base: BaseDataType, val sub: BaseDataType
}
fun dereference(): DataType {
require(isPointer || isUnsignedWord)
require(isPointer || isUnsignedWord) { "cannot dereference non-pointer type ${this}"}
return when {
isUnsignedWord -> forDt(BaseDataType.UBYTE)
sub!=null -> forDt(sub)