External Libary Native Functions input different values from the actual parsed argument values #16
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Edit: This has been temporarily fixed, at the cost of ground variables taking up 3x the size.
The Bug
When using external libraries, the args.values[0].data.___Val returns an incorrect value. This makes external libraries completely unusable.
Evidence: Create a custom function, and include
printf("%lo\n", args.values[0].data.intVal)at the beginning. This will print a different number to the integer argument that was parsed.The Cause
This bug goes away when removing the
struct GroundStruct* customType;line from withintypedef struct GroundValue { ... } GroundValue;definition. I would assume this is due to the new field not being initialised properly in some important function.Note: This issue first occured in commit
925077d55e, PR #12: mergemasterintounstable.