aboutsummaryrefslogtreecommitdiff
path: root/libpcsxcore/gte.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpcsxcore/gte.c')
-rw-r--r--libpcsxcore/gte.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpcsxcore/gte.c b/libpcsxcore/gte.c
index 0acca65..16e0a89 100644
--- a/libpcsxcore/gte.c
+++ b/libpcsxcore/gte.c
@@ -212,7 +212,11 @@ static inline s32 LIM(s32 value, s32 max, s32 min, u32 flag_unused) {
return ret;
}
-#define limE(a) ((a) & 0x1ffff)
+static inline u32 limE(u32 result) {
+ if (result > 0x1ffff)
+ return 0x1ffff;
+ return result;
+}
#endif