X-Git-Url: https://jxself.org/git/?p=inform.git;a=blobdiff_plain;f=expressp.c;h=270f308991371c09b1868c195b191a098453cea6;hp=4c32f0ec962be040b7f74feceea40de9132abfa1;hb=37041256066b0f4023b2664ae4932a23b9b09d55;hpb=5154191043a9b7227ef0eee1a2b40299fc188655 diff --git a/expressp.c b/expressp.c index 4c32f0e..270f308 100644 --- a/expressp.c +++ b/expressp.c @@ -142,6 +142,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: @@ -1881,7 +1889,8 @@ extern assembly_operand parse_expression(int context) if ((a.type == ENDEXP_TT) && (b.type == ENDEXP_TT)) { if (emitter_sp == 0) - { compiler_error("SR error: emitter stack empty"); + { error("No expression between brackets '(' and ')'"); + put_token_back(); return AO; } if (emitter_sp > 1)