aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lobject.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lobject.c b/lobject.c
index 1260fc5c..f5e8a136 100644
--- a/lobject.c
+++ b/lobject.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.c,v 2.104 2015/04/11 18:30:08 roberto Exp roberto $ 2** $Id: lobject.c,v 2.105 2015/06/18 14:26:05 roberto Exp roberto $
3** Some generic functions over Lua objects 3** Some generic functions over Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -55,9 +55,7 @@ int luaO_int2fb (unsigned int x) {
55 55
56/* converts back */ 56/* converts back */
57int luaO_fb2int (int x) { 57int luaO_fb2int (int x) {
58 int e = (x >> 3) & 0x1f; 58 return (x < 8) ? x : ((x & 7) + 8) << ((x >> 3) - 1);
59 if (e == 0) return x;
60 else return ((x & 7) + 8) << (e - 1);
61} 59}
62 60
63 61