mirror of
https://github.com/QB64Official/qb64.git
synced 2024-07-05 03:00:25 +00:00
Fixes PUT
with variable-length strings in UDTs. Closes #133
This commit is contained in:
parent
1a92e9b318
commit
296a46b33c
|
@ -18028,6 +18028,11 @@ FUNCTION evaluatetotyp$ (a2$, targettyp AS LONG)
|
|||
IF (udtetype(E) AND ISSTRING) > 0 AND (udtetype(E) AND ISFIXEDLENGTH) = 0 AND (targettyp = -5) THEN
|
||||
evaluatetotyp$ = "(*(qbs**)" + dst$ + ")->len"
|
||||
EXIT FUNCTION
|
||||
ELSEIF (udtetype(E) AND ISSTRING) > 0 AND (udtetype(E) AND ISFIXEDLENGTH) = 0 AND (targettyp = -4) THEN
|
||||
dst$ = "(*((qbs**)((char*)" + scope$ + n$ + "+(" + o$ + "))))->chr"
|
||||
bytes$ = "(*((qbs**)((char*)" + scope$ + n$ + "+(" + o$ + "))))->len"
|
||||
evaluatetotyp$ = "byte_element((uint64)" + dst$ + "," + bytes$ + "," + NewByteElement$ + ")"
|
||||
EXIT FUNCTION
|
||||
END IF
|
||||
bytes$ = str2(udtesize(E) \ 8)
|
||||
END IF
|
||||
|
|
Loading…
Reference in a new issue