diff options
| -rw-r--r-- | lstrlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstrlib.c,v 1.125 2005/10/19 13:05:11 roberto Exp roberto $ | 2 | ** $Id: lstrlib.c,v 1.126 2005/10/23 17:46:30 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 | */ |
| @@ -639,7 +639,7 @@ static void add_value (MatchState *ms, luaL_Buffer *b, const char *s, | |||
| 639 | lua_pushlstring(L, s, e - s); /* keep original text */ | 639 | lua_pushlstring(L, s, e - s); /* keep original text */ |
| 640 | } | 640 | } |
| 641 | else if (!lua_isstring(L, -1)) | 641 | else if (!lua_isstring(L, -1)) |
| 642 | luaL_error(L, "invalid replacement value"); | 642 | luaL_error(L, "invalid replacement value (a %s)", luaL_typename(L, -1)); |
| 643 | luaL_addvalue(b); /* add result to accumulator */ | 643 | luaL_addvalue(b); /* add result to accumulator */ |
| 644 | } | 644 | } |
| 645 | 645 | ||
