aboutsummaryrefslogtreecommitdiff
path: root/lbitlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbitlib.c')
-rw-r--r--lbitlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbitlib.c b/lbitlib.c
index 02483d69..63dbbe1d 100644
--- a/lbitlib.c
+++ b/lbitlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbitlib.c,v 1.29 2015/10/08 15:55:35 roberto Exp roberto $ 2** $Id: lbitlib.c,v 1.30 2015/11/11 19:08:09 roberto Exp roberto $
3** Standard library for bitwise operations 3** Standard library for bitwise operations
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -131,7 +131,7 @@ static int b_arshift (lua_State *L) {
131 else { /* arithmetic shift for 'negative' number */ 131 else { /* arithmetic shift for 'negative' number */
132 if (i >= LUA_NBITS) r = ALLONES; 132 if (i >= LUA_NBITS) r = ALLONES;
133 else 133 else
134 r = trim((r >> i) | ~(trim(~(lua_Unsigned)0) >> i)); /* add signal bit */ 134 r = trim((r >> i) | ~(trim(~(lua_Unsigned)0) >> i)); /* add sign bit */
135 pushunsigned(L, r); 135 pushunsigned(L, r);
136 return 1; 136 return 1;
137 } 137 }