From: LibretroAdmin Date: Mon, 29 Aug 2022 23:26:03 +0000 (+0200) Subject: Revert "misc: get rid of an unaligned read" X-Git-Tag: r24l~420 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af0df01112a234b848be5fe87a2066bb938d356c;p=pcsx_rearmed.git Revert "misc: get rid of an unaligned read" This reverts commit 5bb56b1a0ec9c4875a4b9f532d79ee477a5a6e8e. --- diff --git a/libpcsxcore/misc.c b/libpcsxcore/misc.c index 854bbb85..f6fe19ad 100644 --- a/libpcsxcore/misc.c +++ b/libpcsxcore/misc.c @@ -56,11 +56,10 @@ struct iso_directory_record { char name [1]; }; -static void mmssdd( char *b, char *p ) +void mmssdd( char *b, char *p ) { int m, s, d; - unsigned char *ub = (void *)b; - int block = (ub[3] << 24) | (ub[2] << 16) | (ub[1] << 8) | ub[0]; + int block = SWAP32(*((uint32_t*) b)); block += 150; m = block / 4500; // minutes