kbengine / kbengine_ue4_plugins

This client-plugins-project is written for kbengine(a MMOG engine of server)

Home Page:http://kbengine.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

安卓端运行BUG

kebiao opened this issue · comments

http://bbs.kbengine.org/forum.php?mod=forumdisplay&fid=2&page=1

template T read(uint32 pos)
{
check(sizeof(T) <= length());
T val;
char* p = (char*)&val;

            for(int i =0;i < sizeof(T);i++)
            {
                p[i] = (data() + pos)[i];
            }

            EndianConvert(val);
            return val;
    }

template T read(uint32 pos)
{
check(sizeof(T) <= length());
T val;

memcpy(void*)&val, (data() + pos), sizeof(T) );

            EndianConvert(val);
            return val;
    }

fixed