mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-27 14:17:59 +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
|
else
|
||||||
{
|
{
|
||||||
void *pBuffer = NULL;
|
void *pBuffer = NULL;
|
||||||
if (filesystem->ReadFileEx( pszScene, "MOD", &pBuffer, false, true ))
|
if (filesystem->ReadFileEx( pszScene, "MOD", &pBuffer, true ))
|
||||||
{
|
{
|
||||||
g_TokenProcessor.SetBuffer((char*)pBuffer);
|
g_TokenProcessor.SetBuffer((char*)pBuffer);
|
||||||
CChoreoScene *pScene = ChoreoLoadScene( pszScene, NULL, &g_TokenProcessor, LocalScene_Printf );
|
CChoreoScene *pScene = ChoreoLoadScene( pszScene, NULL, &g_TokenProcessor, LocalScene_Printf );
|
||||||
@ -5284,7 +5284,7 @@ int GetSceneSpeechCount( char const *pszScene )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
void *pBuffer = NULL;
|
void *pBuffer = NULL;
|
||||||
if (filesystem->ReadFileEx( pszScene, "MOD", &pBuffer, false, true ))
|
if (filesystem->ReadFileEx( pszScene, "MOD", &pBuffer, true ))
|
||||||
{
|
{
|
||||||
int iNumSounds = 0;
|
int iNumSounds = 0;
|
||||||
|
|
||||||
@ -5359,7 +5359,7 @@ void PrecacheInstancedScene( char const *pszScene )
|
|||||||
|
|
||||||
// Attempt to precache manually
|
// Attempt to precache manually
|
||||||
void *pBuffer = NULL;
|
void *pBuffer = NULL;
|
||||||
if (filesystem->ReadFileEx( loadfile, "MOD", &pBuffer, false, true ))
|
if (filesystem->ReadFileEx( loadfile, "MOD", &pBuffer, true ))
|
||||||
{
|
{
|
||||||
g_TokenProcessor.SetBuffer((char*)pBuffer);
|
g_TokenProcessor.SetBuffer((char*)pBuffer);
|
||||||
CChoreoScene *pScene = ChoreoLoadScene( loadfile, NULL, &g_TokenProcessor, LocalScene_Printf );
|
CChoreoScene *pScene = ChoreoLoadScene( loadfile, NULL, &g_TokenProcessor, LocalScene_Printf );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user