cl: use lstrfmt over string.format

This commit is contained in:
Jeremy Baxter 2024-03-24 18:41:37 +13:00
parent 89e584c5f5
commit 3fa54b0cfc

5
lcl.c
View file

@ -41,9 +41,8 @@ fmesgshift(lua_State *L, int fd, int shift)
}
progname = (char *)lua_tostring(L, -1);
/* format using string.format */
lua_getglobal(L, "string");
lua_getfield(L, -1, "format");
/* format using string.format rules */
lua_pushcfunction(L, lstrfmt);
paramc = lua_gettop(L); /* get parameter count */
for (i = 1 + shift; i <= paramc; i++) { /* for every parameter */