Update ipod_touch_sha1.c

fix swapLong argument
This commit is contained in:
PatRyk authored and GitHub committed 2024-08-04 16:34:49 +02:00
1 parent cae1b51a78
commit 4400b861c8
1 file changed
+2 -3
+2 -3
View File
@@ -1,7 +1,6 @@
#include "hw/arm/ipod_touch_sha1.h"
static uint64_t swapLong(void *X) {
uint64_t x = (uint64_t) X;
static uint64_t swapLong(uint64_t x) {
x = (x & 0x00000000FFFFFFFF) << 32 | (x & 0xFFFFFFFF00000000) >> 32;
x = (x & 0x0000FFFF0000FFFF) << 16 | (x & 0xFFFF0000FFFF0000) >> 16;
x = (x & 0x00FF00FF00FF00FF) << 8 | (x & 0xFF00FF00FF00FF00) >> 8;
@@ -150,4 +149,4 @@ static void ipod_touch_machine_types(void)
type_register_static(&ipod_touch_sha1_info);
}
type_init(ipod_touch_machine_types)
type_init(ipod_touch_machine_types)