From f8132bf17cf4ba605a3dedbc3f8318c9eb8c78c4 Mon Sep 17 00:00:00 2001 From: Johan Mattsson <39247600+mjunix@users.noreply.github.com> Date: Mon, 20 Feb 2023 19:50:06 +0100 Subject: [PATCH] Fix index out of bounds --- code/AssetLib/B3D/B3DImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/AssetLib/B3D/B3DImporter.cpp b/code/AssetLib/B3D/B3DImporter.cpp index d970ecabb..e87744603 100644 --- a/code/AssetLib/B3D/B3DImporter.cpp +++ b/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"); }