diff options
Diffstat (limited to 'mp/src/game/shared/voice_banmgr.cpp')
| -rw-r--r-- | mp/src/game/shared/voice_banmgr.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mp/src/game/shared/voice_banmgr.cpp b/mp/src/game/shared/voice_banmgr.cpp index 7f4864d7..d362d58f 100644 --- a/mp/src/game/shared/voice_banmgr.cpp +++ b/mp/src/game/shared/voice_banmgr.cpp @@ -54,11 +54,9 @@ bool CVoiceBanMgr::Init(const char *pGameDir) { int version; filesystem->Read(&version, sizeof(version), fh); - if(version == BANMGR_FILEVERSION) + if(version == BANMGR_FILEVERSION && filesystem->Size(fh) > 4 ) { - filesystem->Seek(fh, 0, FILESYSTEM_SEEK_TAIL); - int nIDs = (filesystem->Tell(fh) - sizeof(version)) / SIGNED_GUID_LEN; - filesystem->Seek(fh, sizeof(version), FILESYSTEM_SEEK_CURRENT); + int nIDs = ( filesystem->Size( fh ) - sizeof(version)) / SIGNED_GUID_LEN; for(int i=0; i < nIDs; i++) { |