diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-04-26 17:41:19 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2006-04-26 17:41:19 -0300 |
commit | fe8f4c06f1949851eccebf59afbe69f132ab40e8 (patch) | |
tree | 7e477a817860d86c56899e4f72bb7c779be4f846 | |
parent | c351392940608702bfed0fa0a4c7d035ad31dbce (diff) | |
download | lua-fe8f4c06f1949851eccebf59afbe69f132ab40e8.tar.gz lua-fe8f4c06f1949851eccebf59afbe69f132ab40e8.tar.bz2 lua-fe8f4c06f1949851eccebf59afbe69f132ab40e8.zip |
detail (better error message for invalid format)
-rw-r--r-- | lstrlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstrlib.c,v 1.130 2005/12/29 15:32:11 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.131 2006/04/12 20:13:52 roberto Exp roberto $ |
3 | ** Standard library for string operations and pattern-matching | 3 | ** Standard library for string operations and pattern-matching |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -809,7 +809,8 @@ static int str_format (lua_State *L) { | |||
809 | } | 809 | } |
810 | } | 810 | } |
811 | default: { /* also treat cases `pnLlh' */ | 811 | default: { /* also treat cases `pnLlh' */ |
812 | return luaL_error(L, "invalid option to " LUA_QL("format")); | 812 | return luaL_error(L, "invalid option " LUA_QL("%%%c") " to " |
813 | LUA_QL("format"), *(strfrmt - 1)); | ||
813 | } | 814 | } |
814 | } | 815 | } |
815 | luaL_addlstring(&b, buff, strlen(buff)); | 816 | luaL_addlstring(&b, buff, strlen(buff)); |