--- libgig/trunk/src/RIFF.cpp 2003/11/16 17:47:00 11 +++ libgig/trunk/src/RIFF.cpp 2005/02/17 02:22:26 384 @@ -2,8 +2,8 @@ * * * libgig - C++ cross-platform Gigasampler format file loader library * * * - * Copyright (C) 2003 by Christian Schoenebeck * - * * + * Copyright (C) 2003-2005 by Christian Schoenebeck * + * * * * * This library is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -192,7 +192,7 @@ #if DEBUG std::cout << "Chunk::Read(void*,ulong,ulong)" << std::endl; #endif // DEBUG - if (ChunkSize - ulPos <= 0) return 0; + if (ulPos >= ChunkSize) return 0; if (ulPos + WordCount * WordSize >= ChunkSize) WordCount = (ChunkSize - ulPos) / WordSize; #if POSIX if (lseek(hFile, ulStartPos + ulPos, SEEK_SET) < 0) return 0;