diff options
Diffstat (limited to 'include/JSystem/J3DGraphBase/J3DTexture.h')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DTexture.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DTexture.h b/include/JSystem/J3DGraphBase/J3DTexture.h index 19bee0e0..451dc2a3 100644 --- a/include/JSystem/J3DGraphBase/J3DTexture.h +++ b/include/JSystem/J3DGraphBase/J3DTexture.h @@ -4,6 +4,7 @@ #include "JSystem/J3DGraphBase/J3DGD.h" #include "JSystem/J3DGraphBase/J3DStruct.h" #include "JSystem/J3DGraphBase/J3DTevs.h" +#include "JSystem/JUtility/JUTAssert.h" #include "JSystem/JUtility/JUTTexture.h" #include "dolphin/mtx/mtx.h" #include "dolphin/types.h" @@ -42,7 +43,10 @@ public: void addResTIMG(u16, ResTIMG const*); u16 getNum() const { return mNum; } - ResTIMG* getResTIMG(u16 entry) const { return &mpRes[entry]; } + ResTIMG* getResTIMG(u16 entry) const { + J3D_ASSERT(72, entry < mNum, "Error : range over."); + return &mpRes[entry]; + } void setResTIMG(u16 entry, const ResTIMG& timg) { mpRes[entry] = timg; mpRes[entry].imageOffset = ((mpRes[entry].imageOffset + (u32)&timg - (u32)(mpRes + entry))); |
