Fixed genRetypesSizes to work properly again with arrays with a non-fixed dimension (oops)

This commit is contained in:
Neil Brown 2008-03-09 18:54:37 +00:00
parent 3d1aae72fc
commit 76aeabe747

View File

@ -1047,7 +1047,13 @@ cgenRetypeSizes m destT destN srcT srcV
call genBytesIn m destT (Left True)
tell [","]
genMeta m
tell [")"] in
tell [")"]
isVarArray = case destT of
A.Array ds _ -> A.UnknownDimension `elem` ds
_ -> False in
if isVarArray
then size >> tell [";"]
else
do tell ["if("]
size
tell ["!=1){"]