diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-05-08 18:02:07 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-05-08 18:02:07 +0200 |
commit | bb8ae12f4f94189fd1540b201e2aea78f485de97 (patch) | |
tree | 276278bd85ffa1571950669656cbdffe1b8fd68a /source/luametatex/source/luarest/lmtposit.c | |
parent | 51156ffe8b1434d9c1896f12a59554cbe877ee3d (diff) | |
download | context-bb8ae12f4f94189fd1540b201e2aea78f485de97.tar.gz |
2023-05-08 17:39:00
Diffstat (limited to 'source/luametatex/source/luarest/lmtposit.c')
-rw-r--r-- | source/luametatex/source/luarest/lmtposit.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/luametatex/source/luarest/lmtposit.c b/source/luametatex/source/luarest/lmtposit.c index e7f12b7d2..0344df5cb 100644 --- a/source/luametatex/source/luarest/lmtposit.c +++ b/source/luametatex/source/luarest/lmtposit.c @@ -100,11 +100,7 @@ static posit_t *positlib_get(lua_State *L, int i) case LUA_TNUMBER: { posit p = positlib_push(L); - if (lua_isinteger(L, i)) { - *p = i64_to_posit(lua_tointeger(L, 1)); - } else { - *p = double_to_posit(lua_tonumber(L, i)); - } + *p = lua_isinteger(L, i) ? integer_to_posit(lua_tointeger(L, i)) : double_to_posit(lua_tonumber(L, i)); lua_replace(L, i); return p; } |