Use internal implementation for converting FP numbers to strings.
Contributed by Peter Cawley.
This commit is contained in:
@@ -495,11 +495,10 @@ LJLIB_CF(print)
|
||||
shortcut = (tvisfunc(tv) && funcV(tv)->c.ffid == FF_tostring);
|
||||
for (i = 0; i < nargs; i++) {
|
||||
cTValue *o = &L->base[i];
|
||||
char buf[STRFMT_MAXBUF_NUM];
|
||||
const char *str;
|
||||
size_t size;
|
||||
MSize len;
|
||||
if (shortcut && (str = lj_strfmt_wstrnum(buf, o, &len)) != NULL) {
|
||||
if (shortcut && (str = lj_strfmt_wstrnum(L, o, &len)) != NULL) {
|
||||
size = len;
|
||||
} else {
|
||||
copyTV(L, L->top+1, o);
|
||||
|
||||
Reference in New Issue
Block a user