mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Previously, the copyrept() and copymacro() functions would halt their first loop (in which they determine the length of the block) prematurely, causing an underflow when setting len, eventually causing memory issues. Whilst this doesn’t solve the len underflow entirely (e.g. if the file ends immediately without an ENDR/ENDM), it should help with this exact scenario of null bytes (as #50).