mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-01 09:10:37 +00:00
Fix bug with _BIT variables in functions
This fix references forum post https://www.qb64.org/forum/index.php?topic=3794.msg131521#msg131521 A C++ error would occur when using a `_BIT` variable as a function argument because our current handling of the translation would reinitialize the variable in the function. This is called shadowing a parameter. I have commented out the line that was causing the error. The code that was provided in the forum post works successfully with this fix.
This commit is contained in:
parent
ec747a53c2
commit
b023f4074b
|
@ -14362,7 +14362,7 @@ FUNCTION dim2 (varname$, typ2$, method, elements$)
|
|||
END IF
|
||||
'standard bit-length variable
|
||||
n$ = scope2$ + n$
|
||||
PRINT #defdatahandle, ct$ + " *" + n$ + "=NULL;"
|
||||
'PRINT #defdatahandle, ct$ + " *" + n$ + "=NULL;"
|
||||
PRINT #13, "if(" + n$ + "==NULL){"
|
||||
PRINT #13, "cmem_sp-=4;"
|
||||
PRINT #13, "if (cmem_sp<qbs_cmem_sp) error(257);"
|
||||
|
|
Loading…
Reference in a new issue