From ba39d0961aca3778d30dde1c4110bef076c46637 Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 24 Jun 2015 23:01:58 +0200 Subject: [PATCH] tottaly found a bug --- lua_modules/base64/base64_v2.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua_modules/base64/base64_v2.lua b/lua_modules/base64/base64_v2.lua index f7fbd22f..72337b4d 100644 --- a/lua_modules/base64/base64_v2.lua +++ b/lua_modules/base64/base64_v2.lua @@ -9,7 +9,7 @@ base64 = { l = bit.lshift(l,8) l = l+d:byte(i,i) if i%3==0 then - while l > 0 do + for j=1,4 do local a = bit.rshift(l,18)+1 out = out..tab:sub(a,a) l = bit.band(bit.lshift(l,6),0xFFFFFF)