diff options
author | George Punter <gsp14@ic.ac.uk> | 2016-10-25 09:35:29 +0100 |
---|---|---|
committer | George Punter <gsp14@ic.ac.uk> | 2016-10-25 09:35:29 +0100 |
commit | 081d37380546cb269f724c008bd34897c5a237df (patch) | |
tree | 1090f72995f235e3d1b3668197a7581ef911c37e | |
parent | fead3ef10057760c977503b3b564048cbfc76ce5 (diff) | |
download | MipsCPU-081d37380546cb269f724c008bd34897c5a237df.tar.gz MipsCPU-081d37380546cb269f724c008bd34897c5a237df.zip |
Added brackets for peace of mind
-rw-r--r-- | src/shared/mips_mem_ram.cpp | 2 |
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; } |