Use explicit conversion type for IR_TOSTR. Add char conversion.

This commit is contained in:
Mike Pall
2013-04-23 02:20:03 +02:00
parent 557391c3b7
commit 255326afb6
10 changed files with 47 additions and 20 deletions

View File

@@ -1611,7 +1611,8 @@ static TRef rec_cat(jit_State *J, BCReg baseslot, BCReg topslot)
/* First convert numbers to strings. */
for (trp = top; trp >= base; trp--) {
if (tref_isnumber(*trp))
*trp = emitir(IRT(IR_TOSTR, IRT_STR), *trp, 0);
*trp = emitir(IRT(IR_TOSTR, IRT_STR), *trp,
tref_isnum(*trp) ? IRTOSTR_NUM : IRTOSTR_INT);
else if (!tref_isstr(*trp))
break;
}