aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Punter <gsp14@ic.ac.uk>2016-10-25 09:35:29 +0100
committerGeorge Punter <gsp14@ic.ac.uk>2016-10-25 09:35:29 +0100
commit081d37380546cb269f724c008bd34897c5a237df (patch)
tree1090f72995f235e3d1b3668197a7581ef911c37e
parentfead3ef10057760c977503b3b564048cbfc76ce5 (diff)
downloadMipsCPU-081d37380546cb269f724c008bd34897c5a237df.tar.gz
MipsCPU-081d37380546cb269f724c008bd34897c5a237df.zip
Added brackets for peace of mind
-rw-r--r--src/shared/mips_mem_ram.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/mips_mem_ram.cpp b/src/shared/mips_mem_ram.cpp
index 81ae63f..179c8fd 100644
--- a/src/shared/mips_mem_ram.cpp
+++ b/src/shared/mips_mem_ram.cpp
@@ -57,7 +57,7 @@ static mips_error mips_mem_read_write(
if(0 != (address % length) ){
return mips_ExceptionInvalidAlignment;
}
- if((address+length) > mem->length || address > (UINT32_MAX - length)){ // A subtle bug here, maybe?
+ if(((address+length) > mem->length) || (address > (UINT32_MAX - length))){ // A subtle bug here, maybe?
return mips_ExceptionInvalidAddress;
}