Add test for built-in file symbol

It's currently defined in fstack.c, making it more prone to accidental
dropping. Let's not repeat the 0.3.9 scenario...
This commit is contained in:
ISSOtm
2020-07-31 18:24:44 +02:00
parent 7c895f8a1b
commit e11f25024e
15 changed files with 343 additions and 432 deletions

View File

@@ -33,7 +33,7 @@
#include "platform.h" // strdup
struct Patch {
char tzFilename[_MAX_PATH + 1];
char *tzFilename;
uint32_t nOffset;
struct Section *pcSection;
uint32_t pcOffset;
@@ -318,7 +318,7 @@ static struct Patch *allocpatch(uint32_t type, struct Expression const *expr,
fatalerror("No memory for patch's RPN expression: %s\n", strerror(errno));
patch->type = type;
fstk_DumpToStr(patch->tzFilename, sizeof(patch->tzFilename));
patch->tzFilename = fstk_DumpToStr();
patch->nOffset = ofs;
patch->pcSection = sect_GetSymbolSection();
patch->pcOffset = sect_GetSymbolOffset();