Closed Argent77 closed 12 months ago
Sorry, WeiDU's variable evaluation is insanity and your proposed NO_EVAL
is not feasible. If you need to work with binary data, have you considered inlined files? You can store the file path rather than the data itself, and the file only has explicit variable evaluation.
WeiDU appears to automatically substitute variables inside array content when used by commands like SPRINT or STRING_LENGTH.
This behavior can introduce subtle bugs when processing binary data (graphics files, etc.), and can result in out-of-bounds reads/writes or corrupted data.
Example code:
Output:
The character sequence
%i%
within the binary data is automatically replaced by the content of the variablei
.Variables inside array data should not be automatically substituted. To retain backwards compatibility it might work to introduce a new flag, such as
NO_EVAL
, which can act as the counterpart toEVAL
.