When using bin2tap with the -b option to add a BASIC loader, it creates a 0 sized tap file and then aborts with a buffer overflow error:
*** buffer overflow detected ***: terminated
Steps to reproduce:
- Compile zxspectrum-utils 1.2 in Arch Linux, you can use the AUR package in https://aur.archlinux.org/packages/zxspectrum-utils.
- Create a simple "hello, world!" assembler program, ORG $8000 for example.
- Assemble with "pasmo" or another cross assembler and output a "test.o" binary file.
- Execute
bin2tap -b -o test.tap test.o and see the buffer overflow error.
I updated the bin2tap to be friendly with modern compilers.
Now bin2tap -b runs fine, but it creates a BASIC program that seems to be corrupt at line 50 (LOAD ""CODE) and crashes the Speccy when running:
The "test" code runs fine using this:
I rewrote the loader generator to prevent these bugs. Please, test it again.
Now it works perfectly, thank you!