Merge pull request #261 from alliedmodders/handle-dump-loc

Make handle dump location relative to gamedir to match other sm_dump commands (r=kyles).
This commit is contained in:
Nicholas Hastings 2015-02-08 17:14:42 -05:00
commit 591aea54b6

View File

@ -397,11 +397,14 @@ CON_COMMAND(sm_dump_handles, "Dumps Handle usage to a file for finding Handle le
if (strcmp(args.Arg(1), "log") != 0)
{
char filename[PLATFORM_MAX_PATH];
const char *arg = args.Arg(1);
FILE *fp = fopen(arg, "wt");
g_SourceMod.BuildPath(Path_Game, filename, sizeof(filename), "%s", arg);
FILE *fp = fopen(filename, "wt");
if (!fp)
{
g_RootMenu.ConsolePrint("Could not find file \"%s\"", arg);
g_RootMenu.ConsolePrint("Failed to open \"%s\" for writing", filename);
return;
}