mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-27 10:00:30 +01:00
Using size_t for lengths (also remove most warnings when compiling for x64)
This commit is contained in:
1 parent
a0f2dccd07
commit
85b7ac3ed5
53 files changed
+814
-514
No files matched your search
@@ -320,10 +320,10 @@ md5_init(md5_state_t *pms)
|
||||
}
|
||||
|
||||
void
|
||||
md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
|
||||
md5_append(md5_state_t *pms, const md5_byte_t *data, size_t nbytes)
|
||||
{
|
||||
const md5_byte_t *p = data;
|
||||
int left = nbytes;
|
||||
size_t left = nbytes;
|
||||
int offset = (pms->count[0] >> 3) & 63;
|
||||
md5_word_t nbits = (md5_word_t)(nbytes << 3);
|
||||
|
||||
@@ -338,7 +338,7 @@ md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
|
||||
|
||||
/* Process an initial partial block. */
|
||||
if (offset) {
|
||||
int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
|
||||
size_t copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
|
||||
|
||||
memcpy(pms->buf + offset, p, copy);
|
||||
if (offset + copy < 64)
|
||||
|
||||
Reference in new issue
Block a user