mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-26 21:57:57 +03:00
Fix ReadFileEx() arguments when loading scene files
The parser expects NUL terminated data.
This commit is contained in:
parent
7d2970eacd
commit
e989cf63c5
@ -4298,7 +4298,7 @@ const char *GetFirstSoundInScene(const char *pszScene)
|
||||
else
|
||||
{
|
||||
void *pBuffer = NULL;
|
||||
if (filesystem->ReadFileEx( pszScene, "MOD", &pBuffer, false, true ))
|
||||
if (filesystem->ReadFileEx( pszScene, "MOD", &pBuffer, true ))
|
||||
{
|
||||
g_TokenProcessor.SetBuffer((char*)pBuffer);
|
||||
CChoreoScene *pScene = ChoreoLoadScene( pszScene, NULL, &g_TokenProcessor, LocalScene_Printf );
|
||||
@ -5284,7 +5284,7 @@ int GetSceneSpeechCount( char const *pszScene )
|
||||
else
|
||||
{
|
||||
void *pBuffer = NULL;
|
||||
if (filesystem->ReadFileEx( pszScene, "MOD", &pBuffer, false, true ))
|
||||
if (filesystem->ReadFileEx( pszScene, "MOD", &pBuffer, true ))
|
||||
{
|
||||
int iNumSounds = 0;
|
||||
|
||||
@ -5359,7 +5359,7 @@ void PrecacheInstancedScene( char const *pszScene )
|
||||
|
||||
// Attempt to precache manually
|
||||
void *pBuffer = NULL;
|
||||
if (filesystem->ReadFileEx( loadfile, "MOD", &pBuffer, false, true ))
|
||||
if (filesystem->ReadFileEx( loadfile, "MOD", &pBuffer, true ))
|
||||
{
|
||||
g_TokenProcessor.SetBuffer((char*)pBuffer);
|
||||
CChoreoScene *pScene = ChoreoLoadScene( loadfile, NULL, &g_TokenProcessor, LocalScene_Printf );
|
||||
|
Loading…
x
Reference in New Issue
Block a user