fix conc instruction

master
Daniel Kolesa 2021-03-28 22:49:46 +02:00
parent 2a017a336c
commit f7ba70b8b2
2 changed files with 2 additions and 5 deletions

View File

@ -583,10 +583,6 @@ static void compileblockmain(codegen_state &gs, int wordtype) {
throw error{gs.ts, "too many @s"};
return;
}
if (concs + 2 > MAX_ARGUMENTS) {
gs.code.push_back(BC_INST_CONC_W | BC_RET_STRING | (concs << 8));
concs = 1;
}
if (compileblockstr(gs, start, esc)) {
concs++;
}

View File

@ -917,7 +917,8 @@ std::uint32_t *vm_exec(
((op & BC_INST_OP_MASK) == BC_INST_CONC) ? " " : ""
);
args.resize(args.size() - numconc, any_value{cs});
force_arg(args.emplace_back(cs), op & BC_INST_RET_MASK);
args.emplace_back(cs).set_str(buf);
force_arg(args.back(), op & BC_INST_RET_MASK);
continue;
}