Browse Source

Merge pull request #4970 from mjunix/patch-1

Fix index out of bounds
Kim Kulling 2 năm trước cách đây
mục cha
commit
27225fadc1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      code/AssetLib/B3D/B3DImporter.cpp

+ 1 - 1
code/AssetLib/B3D/B3DImporter.cpp

@@ -150,7 +150,7 @@ AI_WONT_RETURN void B3DImporter::Fail(const string &str) {
 
 // ------------------------------------------------------------------------------------------------
 int B3DImporter::ReadByte() {
-    if (_pos > _buf.size()) {
+    if (_pos >= _buf.size()) {
         Fail("EOF");
     }