1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed a couple of compiler warnings in the LittleFoot runner class

This commit is contained in:
jules 2016-11-29 10:55:08 +00:00
parent 7bd5c05216
commit 80778a8b65

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;
}
//==============================================================================