From da37ac9c7894186a0e2e0e6f1f5f00b825fd1555 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 27 Dec 2018 14:19:53 -0200 Subject: Detail Slightly better error message for invalid conversions in 'string.format'. --- lstrlib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lstrlib.c') diff --git a/lstrlib.c b/lstrlib.c index e9c60c0f..dde868c0 100644 --- a/lstrlib.c +++ b/lstrlib.c @@ -1180,8 +1180,7 @@ static int str_format (lua_State *L) { break; } default: { /* also treat cases 'pnLlh' */ - return luaL_error(L, "invalid option '%%%c' to 'format'", - *(strfrmt - 1)); + return luaL_error(L, "invalid conversion '%s' to 'format'", form); } } lua_assert(nb < MAX_ITEM); -- cgit v1.2.3-55-g6feb