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:
csoler 2010-09-30 21:44:31 +00:00
parent 47b48769e4
commit edd5aaf87a

View File

@ -121,7 +121,7 @@ uint32_t RsDirUtil::rs_CRC32(const unsigned char *data,uint32_t _len)
uint32_t a = 0xffffffff ;
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++] ;
return a ^ 0xffffffff ;