Merge pull request #370 from alliedmodders/valvefs-default-pathid
Make path id default to "GAME" instead of NULL for FileExists and FileSize if param missing.
This commit is contained in:
commit
a95527a72c
@ -551,7 +551,8 @@ static cell_t sm_FileExists(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
if (params[0] >= 2 && params[2] == 1)
|
if (params[0] >= 2 && params[2] == 1)
|
||||||
{
|
{
|
||||||
char *pathID = NULL;
|
static char szDefaultPath[] = "GAME";
|
||||||
|
char *pathID = szDefaultPath;
|
||||||
if (params[0] >= 3)
|
if (params[0] >= 3)
|
||||||
pContext->LocalToStringNULL(params[3], &pathID);
|
pContext->LocalToStringNULL(params[3], &pathID);
|
||||||
|
|
||||||
@ -664,7 +665,8 @@ static cell_t sm_FileSize(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
if (params[0] >= 2 && params[2] == 1)
|
if (params[0] >= 2 && params[2] == 1)
|
||||||
{
|
{
|
||||||
char *pathID = NULL;
|
static char szDefaultPath[] = "GAME";
|
||||||
|
char *pathID = szDefaultPath;
|
||||||
if (params[0] >= 3)
|
if (params[0] >= 3)
|
||||||
pContext->LocalToStringNULL(params[3], &pathID);
|
pContext->LocalToStringNULL(params[3], &pathID);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user