Merge pull request #2824 from GrosChien/master

ca65 Fixing segfault when using `--expend-macros` without `--listing`
This commit is contained in:
Bob Andrews
2025-09-22 21:18:39 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -728,7 +728,7 @@ ExpandParam:
/* Use next macro token */
TokSet (Mac->Exp);
if (ExpandMacros) {
if (ExpandMacros && SB_GetLen (&ListingName) > 0) {
if (new_expand_line) {
/* Suppress unneeded lines if short expansion
** the ExpandStart is used to ensure that

View File

@@ -252,7 +252,7 @@ static int ReplayTokList (void* List)
/* see description in macro.c */
static int new_expand_line = 1;
if (ExpandMacros) {
if (ExpandMacros && SB_GetLen (&ListingName) > 0) {
if (new_expand_line) {
if (LineLast->FragList == 0 && ExpandMacros==1) {
LineCur->Output--;