Skip to content

Commit 038fa96

Browse files
committed
Return 2 byte size for ByRef arrays
The size of an array passed by ref in the stack is the size of it's pointer (2 bytes for Z80)
1 parent d164af2 commit 038fa96

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

symbols/vararray.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import api.global_ as gl
1515
from api.constants import TYPE
1616
from api.constants import CLASS
17+
from api.constants import SCOPE
1718
from .var import SymbolVAR
1819
from .boundlist import SymbolBOUNDLIST
1920

@@ -42,7 +43,7 @@ def count(self):
4243

4344
@property
4445
def size(self):
45-
return self.count * self.type_.size
46+
return self.count * self.type_.size if self.scope != SCOPE.parameter else TYPE.size(gl.PTR_TYPE)
4647

4748
@property
4849
def memsize(self):

0 commit comments

Comments
 (0)