1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2025-01-11 13:29:44 +00:00

Fix const init size

This commit is contained in:
David Schmenk 2014-11-24 17:35:41 -08:00
parent c92e659a9b
commit 3805fac455

View File

@ -2095,8 +2095,8 @@ def emit_data(vartype, consttype, constval, constsize)
size = constsize
emit_fill(constsize)
elsif consttype == STR_TYPE
size = constsize
chrptr = constval
size = constsize
chrptr = constval
constsize = constsize - 1
emit_byte(constsize)
while constsize > 0
@ -3667,8 +3667,8 @@ def parse_stmnt
return TRUE
end
def parse_var(type)
byte consttype, idlen
word idptr, constval, arraysize, constsize, size
byte consttype, constsize, idlen
word idptr, constval, arraysize, size
idlen = 0
size = 1
@ -3722,8 +3722,8 @@ def parse_var(type)
end
def parse_struc
byte strucid[16]
byte type, idlen, struclen
word size, constsize, offset, idstr
byte type, idlen, struclen, constsize
word size, offset, idstr
struclen = 0
if scan == ID_TKN
@ -3794,7 +3794,7 @@ def parse_vars
return parse_err(@bad_cnst)
fin
idconst_add(idptr, idlen, value)
break
break
is STRUC_TKN
if !parse_struc; parse_err(@bad_struc); fin
break
@ -3810,7 +3810,7 @@ def parse_vars
return FALSE
fin
until token <> COMMA_TKN
break
break
is PREDEF_TKN
repeat
if scan == ID_TKN
@ -3819,9 +3819,9 @@ def parse_vars
return parse_err(@bad_decl)
fin
until scan <> COMMA_TKN
break
break
is EOL_TKN
return TRUE
break
otherwise
return FALSE
wend