libs/luanet: fix error in base64 decoder, patch from fonosfera
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 8 Jun 2009 20:20:12 +0000 (20:20 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 8 Jun 2009 20:20:12 +0000 (20:20 +0000)
libs/luanet/src/base64.c

index f897cf7aa3f0c4f267d0653065c628cbbca878e4..e0c3e7d0e418ddee892a6e653b8a25a118a3cdc5 100644 (file)
@@ -70,7 +70,7 @@ int b64_decode(lua_State *L)
     }
        if(!(dst - out))
                return 0;
-        lua_pushstring(L, (char*)out);
+        lua_pushlstring(L, (char*)out, dst - out);
     return 1;
 }