diff options
-rw-r--r-- | lstrlib.c | 3 | ||||
-rw-r--r-- | testes/strings.lua | 2 |
2 files changed, 2 insertions, 3 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); |
diff --git a/testes/strings.lua b/testes/strings.lua index 1260dbcc..587a0e06 100644 --- a/testes/strings.lua +++ b/testes/strings.lua | |||
@@ -302,7 +302,7 @@ check("%100.3d", "too long") | |||
302 | check("%1"..aux..".3d", "too long") | 302 | check("%1"..aux..".3d", "too long") |
303 | check("%1.100d", "too long") | 303 | check("%1.100d", "too long") |
304 | check("%10.1"..aux.."004d", "too long") | 304 | check("%10.1"..aux.."004d", "too long") |
305 | check("%t", "invalid option") | 305 | check("%t", "invalid conversion") |
306 | check("%"..aux.."d", "repeated flags") | 306 | check("%"..aux.."d", "repeated flags") |
307 | check("%d %d", "no value") | 307 | check("%d %d", "no value") |
308 | 308 | ||