summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrés <andmarti@gmail.com>2022-02-02 10:38:11 -0300
committerAndrés <andmarti@gmail.com>2022-02-02 10:38:11 -0300
commitd79ad475cb3e92f07f3e3ca7dcb8e8f53081dcc7 (patch)
tree710a40ef30fd62edf9851486e6d5ab7556b9bdb9
parent54b30f3c97925852d21cbb485abf94100139be2f (diff)
fix swapped arguments on lsetform
-rw-r--r--src/lua.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua.c b/src/lua.c
index d212185..d2a26ba 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -206,8 +206,8 @@ static int l_setform (lua_State *L) {
int r, c;
char * val;
wchar_t buf[BUFFERSIZE];
- r = lua_tointeger(L, 1); /* get argument */
- c = lua_tointeger(L, 2);
+ r = lua_tointeger(L, 2); /* get argument */
+ c = lua_tointeger(L, 1);
val = (char *) lua_tostring(L,3);
swprintf(buf, FBUFLEN, L"LET %s%d=%s", coltoa(c), r, val);
send_to_interp(buf);