mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
The createpatch() function was using a fixed-size buffer. I've changed it to be dynamically allocated. I saw that the RPN format used in patches is slightly different from the one used internally in the assembler, so I added a new member to the Expression struct to track the patch size. I've also limited the RPN expression length to 1MB. I realized that the patch RPN expression could potentially be longer than the internal RPN expression, so the internal expression would need a limit smaller than UINT32_MAX. I thought 1MB would be a reasonable limit.
3.2 KiB
3.2 KiB