aboutsummaryrefslogtreecommitdiff
path: root/src/lj_strfmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_strfmt.c')
-rw-r--r--src/lj_strfmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_strfmt.c b/src/lj_strfmt.c
index 8f968d32..331d9474 100644
--- a/src/lj_strfmt.c
+++ b/src/lj_strfmt.c
@@ -320,7 +320,7 @@ SBuf *lj_strfmt_putfxint(SBuf *sb, SFormat sf, uint64_t k)
320 if ((sf & STRFMT_F_LEFT)) 320 if ((sf & STRFMT_F_LEFT))
321 while (width-- > pprec) *p++ = ' '; 321 while (width-- > pprec) *p++ = ' ';
322 322
323 lua_assert(need == (MSize)(p - ps)); 323 lj_assertX(need == (MSize)(p - ps), "miscalculated format size");
324 setsbufP(sb, p); 324 setsbufP(sb, p);
325 return sb; 325 return sb;
326} 326}
@@ -449,7 +449,7 @@ const char *lj_strfmt_pushvf(lua_State *L, const char *fmt, va_list argp)
449 case STRFMT_ERR: 449 case STRFMT_ERR:
450 default: 450 default:
451 lj_buf_putb(sb, '?'); 451 lj_buf_putb(sb, '?');
452 lua_assert(0); 452 lj_assertL(0, "bad string format near offset %d", fs.len);
453 break; 453 break;
454 } 454 }
455 } 455 }