Flatten InfoZIP directory and fix build issues

This commit is contained in:
Justine Tunney 2022-04-20 21:59:25 -07:00
parent ae638c0850
commit 87396f43bc
66 changed files with 869 additions and 5763 deletions

View file

@ -118,7 +118,7 @@ int BLAKE2B256_Update(struct Blake2b *b2b, const void *in_data, size_t len) {
if (todo > len) {
todo = len;
}
memcpy(&b2b->block.bytes[b2b->block_used], data, todo);
if (todo) memcpy(&b2b->block.bytes[b2b->block_used], data, todo);
b2b->block_used += todo;
data += todo;
len -= todo;
@ -137,7 +137,7 @@ int BLAKE2B256_Update(struct Blake2b *b2b, const void *in_data, size_t len) {
data += BLAKE2B_CBLOCK;
len -= BLAKE2B_CBLOCK;
}
memcpy(b2b->block.bytes, data, len);
if (len) memcpy(b2b->block.bytes, data, len);
b2b->block_used = len;
return 0;
}