Canonicalize string conversion of nan, inf, -inf.

This commit is contained in:
Mike Pall
2010-05-20 00:40:51 +02:00
parent c7a3103f41
commit 926f688cd0
4 changed files with 42 additions and 12 deletions

View File

@@ -413,8 +413,7 @@ LJLIB_CF(print)
size = strV(o)->len;
} else if (shortcut && tvisnum(o)) {
char buf[LUAI_MAXNUMBER2STR];
lua_Number n = numV(o);
size = (size_t)lua_number2str(buf, n);
size = lj_str_bufnum(buf, o);
str = buf;
} else {
copyTV(L, L->top+1, o);