notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78de287
)
Revert "Revert "misc: get rid of an unaligned read""
author
notaz
<notasas@gmail.com>
Tue, 30 Aug 2022 21:02:47 +0000
(
00:02
+0300)
committer
notaz
<notasas@gmail.com>
Tue, 30 Aug 2022 21:02:47 +0000
(
00:02
+0300)
This reverts commit
af0df01112a234b848be5fe87a2066bb938d356c
.
libpcsxcore/misc.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/misc.c
b/libpcsxcore/misc.c
index
f6fe19a
..
854bbb8
100644
(file)
--- a/
libpcsxcore/misc.c
+++ b/
libpcsxcore/misc.c
@@
-56,10
+56,11
@@
struct iso_directory_record {
char name [1];
};
-void mmssdd( char *b, char *p )
+
static
void mmssdd( char *b, char *p )
{
int m, s, d;
- int block = SWAP32(*((uint32_t*) b));
+ unsigned char *ub = (void *)b;
+ int block = (ub[3] << 24) | (ub[2] << 16) | (ub[1] << 8) | ub[0];
block += 150;
m = block / 4500; // minutes