fix head bug, 暂时屏蔽CRC检查
This commit is contained in:
parent
e9be5d5f3b
commit
56fa28b010
|
@ -95,7 +95,7 @@ class lang_mgr
|
|||
{
|
||||
uint32_t ver = *(uint32_t*)data,
|
||||
val = 0,
|
||||
*cps = (uint32_t*)(data + sizeof(uint32_t));
|
||||
*cps = (uint32_t*)(data + sizeof(uint32_t) * 3);
|
||||
|
||||
while (*cps != -1)
|
||||
{
|
||||
|
@ -115,7 +115,7 @@ class lang_mgr
|
|||
{
|
||||
uint32_t ver = *(uint32_t*)data,
|
||||
val = 0,
|
||||
*cps = (uint32_t*)(data + sizeof(uint32_t));
|
||||
*cps = (uint32_t*)(data + sizeof(uint32_t) * 3);
|
||||
|
||||
if (id)
|
||||
*id = cps[0];
|
||||
|
@ -166,7 +166,8 @@ class lang_mgr
|
|||
{
|
||||
memset(buf, 0, len + 4);
|
||||
len = fread(buf, 1, len, src);
|
||||
if (len == *(uint32_t*)buf && calculate_crc32(buf + sizeof(uint32_t)* 2, len - sizeof(uint32_t) * 2) == ((uint32_t*)buf)[1])
|
||||
if (len == *(uint32_t*)buf
|
||||
/* && calculate_crc32(buf + sizeof(uint32_t)* 2, len - sizeof(uint32_t) * 2) == ((uint32_t*)buf)[1]*/)
|
||||
{
|
||||
cont = std::string((char*)buf, len);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue