diff --git a/code/StreamReader.h b/code/StreamReader.h index 8ce20adec..88aea62db 100644 --- a/code/StreamReader.h +++ b/code/StreamReader.h @@ -59,7 +59,7 @@ namespace Assimp * is known at compile-time. */ template -class ASSIMP_API StreamReader +class StreamReader { public: @@ -109,7 +109,7 @@ public: */ inline int8_t GetI1() { - if (current + 1 >= end) + if (current >= end) throw new ImportErrorException("End of file was reached"); return *current++; @@ -162,7 +162,7 @@ private: template inline T Get() { - if (current + sizeof(T) >= end) + if (current + sizeof(T) > end) throw new ImportErrorException("End of file was reached"); T f = *((const T*)current);