It's a bug - a struct name as argument for INVOKE is supposed to push the struct's size. jwasm erroneously checks this size and wants it to match the parameter's size.
workaround: use SIZEOF before the struct name: invoke MySub, sizeof MyStructB
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the quick response.
Took a QUICK look at Invoke.c - INVOKE_ARGUMENT_TYPE_MISMATCH
If you have a the general area of where the bug is, I can try to resolve it. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Strange Struct Bug?
StructBug.asm(26) : Error A2145: INVOKE argument type mismatch: argument 1
StructBug.asm: 44 lines, 1 passes, 15 ms, 0 warnings, 1 errors
Why does jwasm report Error A2145?
See simple code example below:
Thanks!
> Why does jwasm report Error A2145?
It's a bug - a struct name as argument for INVOKE is supposed to push the struct's size. jwasm erroneously checks this size and wants it to match the parameter's size.
workaround: use SIZEOF before the struct name: invoke MySub, sizeof MyStructB
Thanks for the quick response.
Took a QUICK look at Invoke.c - INVOKE_ARGUMENT_TYPE_MISMATCH
If you have a the general area of where the bug is, I can try to resolve it. :)
> If you have a the general area of where the bug is, I can try to resolve it. :)
Thanks for the offer, but this bug is relatively simple to fix! The next prerelease will contain this fix in invoke.c:
Tested it and it works…. Thanks again!