Explorar el Código

Added StreamReader.h

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@182 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg hace 17 años
padre
commit
f2c9745b7d
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      code/StreamReader.h

+ 3 - 3
code/StreamReader.h

@@ -59,7 +59,7 @@ namespace Assimp
  * is known at compile-time.
  */
 template <bool SwapEndianess = false>
-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 <typename T>
 	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);