diff options
Diffstat (limited to 'lstrlib.c')
-rw-r--r-- | lstrlib.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1185,6 +1185,11 @@ static int str_format (lua_State *L) { | |||
1185 | nb = l_sprintf(buff, MAX_ITEM, form, (LUAI_UACNUMBER)n); | 1185 | nb = l_sprintf(buff, MAX_ITEM, form, (LUAI_UACNUMBER)n); |
1186 | break; | 1186 | break; |
1187 | } | 1187 | } |
1188 | case 'p': { | ||
1189 | const void *p = lua_topointer(L, arg); | ||
1190 | nb = l_sprintf(buff, MAX_ITEM, form, p); | ||
1191 | break; | ||
1192 | } | ||
1188 | case 'q': { | 1193 | case 'q': { |
1189 | if (form[2] != '\0') /* modifiers? */ | 1194 | if (form[2] != '\0') /* modifiers? */ |
1190 | return luaL_error(L, "specifier '%%q' cannot have modifiers"); | 1195 | return luaL_error(L, "specifier '%%q' cannot have modifiers"); |