aboutsummaryrefslogtreecommitdiff
path: root/src/lj_strfmt.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_strfmt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lj_strfmt.c b/src/lj_strfmt.c
index a9541d41..5826b539 100644
--- a/src/lj_strfmt.c
+++ b/src/lj_strfmt.c
@@ -164,6 +164,10 @@ const char *lj_strfmt_wstrnum(lua_State *L, cTValue *o, MSize *lenp)
164 if (tvisstr(o)) { 164 if (tvisstr(o)) {
165 *lenp = strV(o)->len; 165 *lenp = strV(o)->len;
166 return strVdata(o); 166 return strVdata(o);
167 } else if (tvisbuf(o)) {
168 SBufExt *sbx = bufV(o);
169 *lenp = sbufxlen(sbx);
170 return sbx->r;
167 } else if (tvisint(o)) { 171 } else if (tvisint(o)) {
168 sb = lj_strfmt_putint(lj_buf_tmp_(L), intV(o)); 172 sb = lj_strfmt_putint(lj_buf_tmp_(L), intV(o));
169 } else if (tvisnum(o)) { 173 } else if (tvisnum(o)) {
@@ -421,6 +425,10 @@ int lj_strfmt_putarg(lua_State *L, SBuf *sb, int arg, int retry)
421 if (LJ_LIKELY(tvisstr(o))) { 425 if (LJ_LIKELY(tvisstr(o))) {
422 len = strV(o)->len; 426 len = strV(o)->len;
423 s = strVdata(o); 427 s = strVdata(o);
428 } else if (tvisbuf(o)) {
429 SBufExt *sbx = bufV(o);
430 len = sbufxlen(sbx);
431 s = sbx->r;
424 } else { 432 } else {
425 GCstr *str = lj_strfmt_obj(L, o); 433 GCstr *str = lj_strfmt_obj(L, o);
426 len = str->len; 434 len = str->len;