summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2014-08-05 17:27:55 +0100
committerReuben Thomas <rrt@sc3d.org>2014-08-05 17:27:55 +0100
commit1c83c2328a18fc40334aa0472fed17c3d2dca239 (patch)
tree41345f522eaffdd49c73958703a1d05388e57eae
parent55ba8f6cbd3619f7318f4b4d5fac962ec57dd853 (diff)
downloadlrexlib-1c83c2328a18fc40334aa0472fed17c3d2dca239.tar.gz
We're checking for a valid metaMETHOD, not a valid metaFIELD
-rw-r--r--src/algo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/algo.h b/src/algo.h
index fcc81ad..7c9d443 100644
--- a/src/algo.h
+++ b/src/algo.h
@@ -139,7 +139,7 @@ static void check_subject (lua_State *L, int pos, TArgExec *argE)
argE->textlen = lua_objlen (L, pos);
else {
if (!luaL_getmetafield (L, pos, "__len") || lua_type (L, -1) != LUA_TFUNCTION)
- luaL_argerror (L, pos, "the subject has no valid __len metafield");
+ luaL_argerror (L, pos, "the subject has no valid __len metamethod");
lua_pushvalue (L, pos);
lua_call (L, 1, 1);
type = lua_type (L, -1);