mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-05 22:50:23 +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
|
IF (udtetype(E) AND ISSTRING) > 0 AND (udtetype(E) AND ISFIXEDLENGTH) = 0 AND (targettyp = -5) THEN
|
||||||
evaluatetotyp$ = "(*(qbs**)" + dst$ + ")->len"
|
evaluatetotyp$ = "(*(qbs**)" + dst$ + ")->len"
|
||||||
EXIT FUNCTION
|
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
|
END IF
|
||||||
bytes$ = str2(udtesize(E) \ 8)
|
bytes$ = str2(udtesize(E) \ 8)
|
||||||
END IF
|
END IF
|
||||||
|
|
Loading…
Reference in a new issue