mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
suppressed bug in CRC32 computation of files
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3575 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
47b48769e4
commit
edd5aaf87a
@ -121,7 +121,7 @@ uint32_t RsDirUtil::rs_CRC32(const unsigned char *data,uint32_t _len)
|
|||||||
uint32_t a = 0xffffffff ;
|
uint32_t a = 0xffffffff ;
|
||||||
int64_t len = _len ;
|
int64_t len = _len ;
|
||||||
|
|
||||||
for(const unsigned char *buf=data;len>=0;len--)
|
for(const unsigned char *buf=data;len>0;len--)
|
||||||
a = (a >> 8) ^ crc32_table[ (a & 0xff) ^ *buf++] ;
|
a = (a >> 8) ^ crc32_table[ (a & 0xff) ^ *buf++] ;
|
||||||
|
|
||||||
return a ^ 0xffffffff ;
|
return a ^ 0xffffffff ;
|
||||||
|
Loading…
Reference in New Issue
Block a user