mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Prevent assertions outside sections from crashing
This commit is contained in:
@@ -362,7 +362,7 @@ bool out_CreateAssert(enum AssertionType type, struct Expression const *expr,
|
||||
static void writeassert(struct Assertion *assert, FILE *f)
|
||||
{
|
||||
writepatch(assert->patch, f);
|
||||
fputlong(getsectid(assert->section), f);
|
||||
fputlong(assert->section ? getsectid(assert->section) : -1, f);
|
||||
fputstring(assert->message, f);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user