util-src/encodings.c
changeset 8294 fba1ea67f5c0
parent 8001 604beb13596a
child 9156 26c5a4a14905
--- a/util-src/encodings.c	Wed Oct 04 12:06:18 2017 +0200
+++ b/util-src/encodings.c	Thu Oct 05 12:48:36 2017 +0200
@@ -216,7 +216,7 @@
  */
 const char *check_utf8(lua_State *L, int idx, size_t *l) {
 	size_t pos, len;
-	const char *s = luaL_checklstring(L, 1, &len);
+	const char *s = luaL_checklstring(L, idx, &len);
 	pos = 0;
 
 	while(pos <= len) {