diff options
author | Revo <projectrevotpp@hotmail.com> | 2020-08-04 09:24:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 09:24:58 -0400 |
commit | a253a0513906c02326afdafefe6feddc3de7a3a1 (patch) | |
tree | 2bb45658a16f11846b995e0f05e362661f418f0f /tools/mwasmarm_patcher/mwasmarm_patcher.c | |
parent | ae5720bd68f9d1910ade441017190c41e175b643 (diff) | |
parent | 1f219b2e2fc933d8fa562afdb91fe06ffa175d71 (diff) |
Merge pull request #257 from PikalaxALT/pikalax_work
unk_02015CC0; fix knarc and msgenc compiling with older g++
Diffstat (limited to 'tools/mwasmarm_patcher/mwasmarm_patcher.c')
-rw-r--r-- | tools/mwasmarm_patcher/mwasmarm_patcher.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/mwasmarm_patcher/mwasmarm_patcher.c b/tools/mwasmarm_patcher/mwasmarm_patcher.c index 7d15820d..e5ad3272 100644 --- a/tools/mwasmarm_patcher/mwasmarm_patcher.c +++ b/tools/mwasmarm_patcher/mwasmarm_patcher.c @@ -80,7 +80,7 @@ unsigned char * calculate_sha1 (const void * data, unsigned length) { uint32_t state[5] = {0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0};
const char * current;
unsigned remaining;
- for (current = data, remaining = length; remaining >= 64; current += 64, remaining -= 64) sha1_process_block(current, state);
+ for (current = data, remaining = length; remaining >= 64; current += 64, remaining -= 64) sha1_process_block((const uint8_t *)current, state);
// technically only {0} is necessary, but better safe than sorry
unsigned char last_block[64] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
@@ -224,9 +224,9 @@ int main(int argc, char *argv[]) { }
free(string);
- unsigned char buf[SHA_DIGEST_LENGTH*2];
+ char buf[SHA_DIGEST_LENGTH*2];
for (int i=0; i < SHA_DIGEST_LENGTH; i++) {
- sprintf((unsigned char*)&(buf[i*2]), "%02x", sha1[i]);
+ sprintf(&(buf[i*2]), "%02x", sha1[i]);
}
free(sha1);
|