diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-27 14:19:53 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-12-27 14:19:53 -0200 |
commit | da37ac9c7894186a0e2e0e6f1f5f00b825fd1555 (patch) | |
tree | 1517d929465415e6b6db24617778cc5f0bbf3c5d /lstrlib.c | |
parent | 662506476b3b9bf651de064884a00c8dbce6e281 (diff) | |
download | lua-da37ac9c7894186a0e2e0e6f1f5f00b825fd1555.tar.gz lua-da37ac9c7894186a0e2e0e6f1f5f00b825fd1555.tar.bz2 lua-da37ac9c7894186a0e2e0e6f1f5f00b825fd1555.zip |
Detail
Slightly better error message for invalid conversions in 'string.format'.
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1180,8 +1180,7 @@ static int str_format (lua_State *L) { | |||
1180 | break; | 1180 | break; |
1181 | } | 1181 | } |
1182 | default: { /* also treat cases 'pnLlh' */ | 1182 | default: { /* also treat cases 'pnLlh' */ |
1183 | return luaL_error(L, "invalid option '%%%c' to 'format'", | 1183 | return luaL_error(L, "invalid conversion '%s' to 'format'", form); |
1184 | *(strfrmt - 1)); | ||
1185 | } | 1184 | } |
1186 | } | 1185 | } |
1187 | lua_assert(nb < MAX_ITEM); | 1186 | lua_assert(nb < MAX_ITEM); |