diff options
Diffstat (limited to 'lvm.h')
-rw-r--r-- | lvm.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -90,7 +90,7 @@ typedef enum { | |||
90 | if (!ttistable(t)) aux = HNOTATABLE; \ | 90 | if (!ttistable(t)) aux = HNOTATABLE; \ |
91 | else { Table *h = hvalue(t); lua_Unsigned u = l_castS2U(k); \ | 91 | else { Table *h = hvalue(t); lua_Unsigned u = l_castS2U(k); \ |
92 | if ((u - 1u < h->alimit)) { \ | 92 | if ((u - 1u < h->alimit)) { \ |
93 | int tag = *getArrTag(h,u); \ | 93 | int tag = *getArrTag(h,(u)-1u); \ |
94 | if (tagisempty(tag)) aux = HNOTFOUND; \ | 94 | if (tagisempty(tag)) aux = HNOTFOUND; \ |
95 | else { farr2val(h, u, tag, res); aux = HOK; }} \ | 95 | else { farr2val(h, u, tag, res); aux = HOK; }} \ |
96 | else { aux = luaH_getint(h, u, res); }} | 96 | else { aux = luaH_getint(h, u, res); }} |
@@ -103,7 +103,7 @@ typedef enum { | |||
103 | if (!ttistable(t)) aux = HNOTATABLE; \ | 103 | if (!ttistable(t)) aux = HNOTATABLE; \ |
104 | else { Table *h = hvalue(t); lua_Unsigned u = l_castS2U(k); \ | 104 | else { Table *h = hvalue(t); lua_Unsigned u = l_castS2U(k); \ |
105 | if ((u - 1u < h->alimit)) { \ | 105 | if ((u - 1u < h->alimit)) { \ |
106 | lu_byte *tag = getArrTag(h,u); \ | 106 | lu_byte *tag = getArrTag(h,(u)-1u); \ |
107 | if (tagisempty(*tag)) aux = ~cast_int(u); \ | 107 | if (tagisempty(*tag)) aux = ~cast_int(u); \ |
108 | else { fval2arr(h, u, tag, val); aux = HOK; }} \ | 108 | else { fval2arr(h, u, tag, val); aux = HOK; }} \ |
109 | else { aux = luaH_psetint(h, u, val); }} | 109 | else { aux = luaH_psetint(h, u, val); }} |