Fix buffer overflow when displaying a scrolling background
When scrolling background images are loaded, the buffer that stores the background image was not NULL-terminated. This triggered buffer overflows down the line, as the string is later copied and compared with strcpy
/strcmp
, which requires the string to be NULL-terminated. This bug shouldn't impact anything in practice, but ASAN still picked it up, so might as well fix it.