aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib_base.c4
-rw-r--r--src/lj_carith.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib_base.c b/src/lib_base.c
index 57b0c0ad..bf98f284 100644
--- a/src/lib_base.c
+++ b/src/lib_base.c
@@ -243,7 +243,9 @@ LJLIB_CF(unpack)
243 } else { 243 } else {
244 setnilV(L->top++); 244 setnilV(L->top++);
245 } 245 }
246 } while (i++ < e); 246 if (i >= e) break;
247 i++;
248 } while (1);
247 return n; 249 return n;
248} 250}
249 251
diff --git a/src/lj_carith.c b/src/lj_carith.c
index 9c0c81c3..12c3ced2 100644
--- a/src/lj_carith.c
+++ b/src/lj_carith.c
@@ -120,7 +120,7 @@ static int carith_ptr(lua_State *L, CTState *cts, CDArith *ca, MMS mm)
120 /* All valid pointer differences on x64 are in (-2^47, +2^47), 120 /* All valid pointer differences on x64 are in (-2^47, +2^47),
121 ** which fits into a double without loss of precision. 121 ** which fits into a double without loss of precision.
122 */ 122 */
123 setintptrV(L->top-1, (int32_t)diff); 123 setintptrV(L->top-1, diff);
124 return 1; 124 return 1;
125 } else if (mm == MM_lt) { /* Pointer comparison (unsigned). */ 125 } else if (mm == MM_lt) { /* Pointer comparison (unsigned). */
126 setboolV(L->top-1, ((uintptr_t)pp < (uintptr_t)pp2)); 126 setboolV(L->top-1, ((uintptr_t)pp < (uintptr_t)pp2));