mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
SW: Replace old crc32 functions with Bcrc32, mirroring how it's used in Duke's grpscan.cpp.
Patch from Striker. git-svn-id: https://svn.eduke32.com/eduke32@7510 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b242259be1
commit
7991de2793
1 changed files with 2 additions and 4 deletions
|
@ -141,7 +141,7 @@ int ScanGroups(void)
|
|||
|
||||
{
|
||||
int b, fh;
|
||||
unsigned int crcval;
|
||||
unsigned int crcval = 0;
|
||||
unsigned char buf[16*512];
|
||||
|
||||
fh = openfrompath(sidx->name, BO_RDONLY|BO_BINARY, BS_IREAD);
|
||||
|
@ -149,14 +149,12 @@ int ScanGroups(void)
|
|||
if (fstat(fh, &st)) continue;
|
||||
|
||||
buildprintf(" Checksumming %s...", sidx->name);
|
||||
crc32init(&crcval);
|
||||
do
|
||||
{
|
||||
b = read(fh, buf, sizeof(buf));
|
||||
if (b > 0) crc32block(&crcval, buf, b);
|
||||
if (b > 0) crcval = Bcrc32(buf, b, crcval);
|
||||
}
|
||||
while (b == sizeof(buf));
|
||||
crc32finish(&crcval);
|
||||
close(fh);
|
||||
buildputs(" Done\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue