2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-28 15:45:46 +03:00

HLTV: Fix typo.

This commit is contained in:
s1lent 2017-05-09 21:38:59 +07:00
parent 7432df957c
commit 18f75dadf4
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C
2 changed files with 4 additions and 4 deletions

View File

@ -363,10 +363,10 @@ bool DemoFile::LoadDemo(char *demoname)
m_FileSystem->Read(&m_EntryNumber, sizeof(int), m_FileHandle);
m_CurrentEntry = 0;
if (m_EntryNumber > 0 && m_EntryNumber <= 1024)
if (m_EntryNumber > 0 && m_EntryNumber <= MAX_DEMO_ENTRY)
{
m_Entries = (demoentry_t *)Mem_ZeroMalloc(m_EntryNumber * MAX_DEMO_ENTRY);
m_FileSystem->Read(m_Entries, m_EntryNumber * MAX_DEMO_ENTRY, m_FileHandle);
m_Entries = (demoentry_t *)Mem_ZeroMalloc(sizeof(demoentry_t) * m_EntryNumber);
m_FileSystem->Read(m_Entries, sizeof(demoentry_t) * m_EntryNumber, m_FileHandle);
m_FileSystem->Seek(m_FileHandle, m_Entries[m_CurrentEntry].nOffset, FILESYSTEM_SEEK_HEAD);
}
else

View File

@ -39,7 +39,7 @@
#include "vmodes.h"
#include "cdll_int.h"
const int MAX_DEMO_ENTRY = 92;
const int MAX_DEMO_ENTRY = 1024;
const int DEMO_PROTOCOL = 5;