Browse Source

Fixed a couple of compiler warnings in the LittleFoot runner class

tags/2021-05-28
jules 8 years ago
parent
commit
80778a8b65
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h

+ 2
- 2
modules/juce_blocks_basics/littlefoot/juce_LittleFootRunner.h View File

@@ -501,7 +501,7 @@ struct Runner
/** */
int32 setHeapInt (uint32 byteOffset, uint32 value) noexcept
{
if (byteOffset < (uint32) (getProgramHeapSize() - 3))
if (byteOffset + 3 < getProgramHeapSize())
Program::writeInt32 (getProgramHeapStart() + byteOffset, (int32) value);
return 0;
@@ -510,7 +510,7 @@ struct Runner
/** */
int32 getHeapInt (uint32 byteOffset) const noexcept
{
return byteOffset < getProgramHeapSize() - 3 ? Program::readInt32 (getProgramHeapStart() + byteOffset) : 0;
return byteOffset + 3 < getProgramHeapSize() ? Program::readInt32 (getProgramHeapStart() + byteOffset) : 0;
}
//==============================================================================


Loading…
Cancel
Save