Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Duplicate condition fix.
Thanks j4ck.fr0st
  • Loading branch information
lioncash committed Jan 26, 2013
1 parent 1e006b5 commit efe8c75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Source/Core/VideoCommon/Src/BPStructs.cpp
Expand Up @@ -519,9 +519,8 @@ void BPWritten(const BPCmd& bp)

for (u32 i = 0; i < tmem_cfg.preload_tile_info.count; ++i)
{
// FIXME: Duplicate conditions.
if (tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE ||
tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE)
tmem_addr_odd + TMEM_LINE_SIZE > TMEM_SIZE)
break;

memcpy(texMem + tmem_addr_even, src_ptr, TMEM_LINE_SIZE);
Expand Down
5 changes: 2 additions & 3 deletions Source/Plugins/Plugin_VideoSoftware/Src/BPMemLoader.cpp
Expand Up @@ -135,11 +135,10 @@ void SWBPWritten(int address, int newvalue)
// AR and GB tiles are stored in separate TMEM banks => can't use a single memcpy for everything
u32 tmem_addr_odd = tmem_cfg.preload_tmem_odd * TMEM_LINE_SIZE;

for (int i = 0; i < tmem_cfg.preload_tile_info.count; ++i)
for (unsigned int i = 0; i < tmem_cfg.preload_tile_info.count; ++i)
{
// FIXME: Duplicate conditions
if (tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE ||
tmem_addr_even + TMEM_LINE_SIZE > TMEM_SIZE)
tmem_addr_odd + TMEM_LINE_SIZE > TMEM_SIZE)
break;

memcpy(texMem + tmem_addr_even, src_ptr, TMEM_LINE_SIZE);
Expand Down

0 comments on commit efe8c75

Please sign in to comment.