mirror of
https://github.com/ksherlock/x65.git
synced 2024-12-28 19:32:25 +00:00
Fixed broken INCBIN and IMPORT BINARY directives
This commit is contained in:
parent
60780a514a
commit
7d59943d35
@ -100,6 +100,9 @@ Primarily tested with personal archive of sources written for Kick assmebler, DA
|
||||
* irp (indefinite repeat)
|
||||
|
||||
**FIXED**
|
||||
* INCBIN and IMPORT BINARY always failed (force 0 bytes length)
|
||||
* Using more than 16 bytes of Pool labels was flawed
|
||||
* Fixed STRUCT directive (failed if contained line was empty)
|
||||
* Adding x65macro.i
|
||||
* Vice symbols will generate breakpoints whenever label 'debugbreak' is encountered
|
||||
* Evaluating '==' was broken
|
||||
|
2
x65.cpp
2
x65.cpp
@ -4599,7 +4599,7 @@ StatusCode Asm::Directive_Incbin(strref line, int skip, int len)
|
||||
size_t size = 0;
|
||||
if (char *buffer = LoadBinary(line, size)) {
|
||||
int bin_size = (int)size - skip;
|
||||
if (bin_size>len)
|
||||
if (len && bin_size>len)
|
||||
bin_size = len;
|
||||
if (bin_size>0)
|
||||
AddBin((const unsigned char*)buffer+skip, bin_size);
|
||||
|
Loading…
Reference in New Issue
Block a user