ebitengine / purego

Apache License 2.0
2.15k stars 68 forks source link

Fix Three Small Fields losing the last field #211

Closed SealOfTime closed 7 months ago

SealOfTime commented 7 months ago

There was a bug, that caused the last small field, that directly followed a set of small fields that combined into one full machine word, in a struct to not be added to the list of arguments. It was caused by incorrectly marking that the field that is being processed right now is flushed if processing of previous small field resulted in val getting filled enough to be flushed.

In order to avoid similar errors and to have flushing logic at one place I've moved that out into an anonymous function. It should impact performance somewhat, I guess I could just inline it. Would like to hear your opinion on that!

Closes #210