mirror of
https://github.com/irmen/prog8.git
synced 2026-10-22 20:02:27 +00:00
fix certain value copying through pointer dereferences
This commit is contained in:
1 parent
decfbfc8cc
commit
8be0cd3c19
6 files changed
+59
-15
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user