mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-17 01:21:12 +00:00
Fix two 'comparison will always be false' warnings:
* Check the return value for `_wfullpath()`, not the returned pointer. * Check first byte of char array, not the array itself.
This commit is contained in:
parent
658b6543ed
commit
72ec12f8df
1 changed files with 2 additions and 3 deletions
|
@ -601,9 +601,8 @@ Sys_Realpath(const char *in, char *out, size_t size)
|
|||
WCHAR wconverted[MAX_OSPATH] = {0};
|
||||
|
||||
MultiByteToWideChar(CP_UTF8, 0, in, -1, win, sizeof(win)/sizeof(win[0]));
|
||||
_wfullpath(wconverted, win, size);
|
||||
|
||||
if (wconverted == NULL)
|
||||
if (_wfullpath(wconverted, win, size) == NULL)
|
||||
{
|
||||
Com_Printf("Couldn't get realpath for %s\n", in);
|
||||
return false;
|
||||
|
@ -731,7 +730,7 @@ Sys_RedirectStdout(void)
|
|||
Q_strlcpy(dir, tmp, sizeof(dir));
|
||||
}
|
||||
|
||||
if (dir == NULL)
|
||||
if (dir[0] == '\0')
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue