mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
port: fix potential crash in handInflictMeleeDamage
pointers can be little endian, so there might be a problem
This commit is contained in:
1 parent
fe0d9b3cfd
commit
839143550f
1 file changed
+5
-1
+5
-1
@@ -1170,7 +1170,11 @@ void handInflictMeleeDamage(s32 handnum, struct gset *gset, bool arg2)
|
||||
bool isglass = false;
|
||||
|
||||
if (obj && gset->weaponnum != WEAPON_TRANQUILIZER) {
|
||||
isglass = obj->type == OBJTYPE_GLASS || obj->type == OBJTYPE_TINTEDGLASS;
|
||||
isglass =
|
||||
#ifdef AVOID_UB
|
||||
(prop->type == PROPTYPE_OBJ) &&
|
||||
#endif
|
||||
(obj->type == OBJTYPE_GLASS || obj->type == OBJTYPE_TINTEDGLASS);
|
||||
}
|
||||
|
||||
if (arg2) {
|
||||
|
||||
Reference in new issue
Block a user