return early in case path is null and move vars to the top

This commit is contained in:
radius 2018-03-24 19:03:55 -05:00
parent 51c9ac4f7a
commit 94e4357fd4
1 changed files with 2 additions and 3 deletions

View File

@ -3358,10 +3358,9 @@ found:
* Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found * Output CHEEVOS_VAR_GAMEID the Retro Achievements game ID, or 0 if not found
*************************************************************************/ *************************************************************************/
CORO_SUB(FILENAME_MD5) CORO_SUB(FILENAME_MD5)
{
char base_noext[PATH_MAX_LENGTH];
if (!string_is_empty(coro->path)) if (!string_is_empty(coro->path))
{ {
char base_noext[PATH_MAX_LENGTH];
fill_pathname_base_noext(base_noext, coro->path, sizeof(base_noext)); fill_pathname_base_noext(base_noext, coro->path, sizeof(base_noext));
MD5_Init(&coro->md5); MD5_Init(&coro->md5);
@ -3370,7 +3369,7 @@ found:
CORO_GOTO(GET_GAMEID); CORO_GOTO(GET_GAMEID);
} }
} CORO_RET();
/************************************************************************** /**************************************************************************
* Info Evaluates the CHEEVOS_VAR_MD5 hash * Info Evaluates the CHEEVOS_VAR_MD5 hash