fix crash related to achievements on non-fullpath cores

This commit is contained in:
radius 2018-03-24 17:51:41 -05:00
parent 75d2813d47
commit 51c9ac4f7a

View File

@ -3360,13 +3360,16 @@ found:
CORO_SUB(FILENAME_MD5)
{
char base_noext[PATH_MAX_LENGTH];
fill_pathname_base_noext(base_noext, coro->path, sizeof(base_noext));
if (!string_is_empty(coro->path))
{
fill_pathname_base_noext(base_noext, coro->path, sizeof(base_noext));
MD5_Init(&coro->md5);
MD5_Update(&coro->md5, (void*)base_noext, strlen(base_noext));
MD5_Final(coro->hash, &coro->md5);
MD5_Init(&coro->md5);
MD5_Update(&coro->md5, (void*)base_noext, strlen(base_noext));
MD5_Final(coro->hash, &coro->md5);
CORO_GOTO(GET_GAMEID);
CORO_GOTO(GET_GAMEID);
}
}
/**************************************************************************