mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 11:12:07 +00:00
Store patch file line in the file name
It's more consistent with how it's stored for all other entries in the stack
This commit is contained in:
@@ -281,7 +281,8 @@ void fstk_DumpToStr(char *buf, size_t buflen)
|
||||
pLastFile = pLastFile->pNext;
|
||||
}
|
||||
|
||||
retcode = snprintf(&buf[buflen - len], len, "%s", tzCurrentFileName);
|
||||
retcode = snprintf(&buf[buflen - len], len, "%s(%d)", tzCurrentFileName,
|
||||
nLineNo);
|
||||
if (retcode < 0)
|
||||
fatalerror("Failed to dump file stack to string: %s",
|
||||
strerror(errno));
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
struct Patch {
|
||||
char tzFilename[_MAX_PATH + 1];
|
||||
uint32_t nLine;
|
||||
uint32_t nOffset;
|
||||
uint8_t nType;
|
||||
uint32_t nRPNSize;
|
||||
@@ -152,7 +151,6 @@ static uint32_t getsectid(struct Section *pSect)
|
||||
static void writepatch(struct Patch *pPatch, FILE *f)
|
||||
{
|
||||
fputstring(pPatch->tzFilename, f);
|
||||
fputlong(pPatch->nLine, f);
|
||||
fputlong(pPatch->nOffset, f);
|
||||
fputc(pPatch->nType, f);
|
||||
fputlong(pPatch->nRPNSize, f);
|
||||
@@ -328,7 +326,6 @@ void out_CreatePatch(uint32_t type, struct Expression *expr)
|
||||
pPatch = allocpatch();
|
||||
pPatch->nType = type;
|
||||
fstk_DumpToStr(pPatch->tzFilename, sizeof(pPatch->tzFilename));
|
||||
pPatch->nLine = nLineNo;
|
||||
pPatch->nOffset = pCurrentSection->nPC;
|
||||
|
||||
while ((rpndata = rpn_PopByte(expr)) != 0xDEAD) {
|
||||
|
||||
Reference in New Issue
Block a user