Skip to content

Commit

Permalink
Fix for Mantis 1094: Replacing a recursive function causes absurdity
Browse files Browse the repository at this point in the history
I think this change allows Replace to work correctly no matter where
the function is called. It does not introduce a new error message.
  • Loading branch information
Andrew Plotkin authored and Andrew Plotkin committed Sep 22, 2016
1 parent 59d079d commit fc814dd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions expressp.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,14 @@ but not used as a value:", unicode);
current_token.symflags = sflags[symbol];
switch(stypes[symbol])
{ case ROUTINE_T:
/* Replaced functions must always be backpatched
because there could be another definition coming. */
if (sflags[symbol] & REPLACE_SFLAG)
{ current_token.marker = SYMBOL_MV;
if (module_switch) import_symbol(symbol);
v = symbol;
break;
}
current_token.marker = IROUTINE_MV;
break;
case GLOBAL_VARIABLE_T:
Expand Down

0 comments on commit fc814dd

Please sign in to comment.