mirror of https://github.com/mgba-emu/mgba.git
Test: Fix crash if directory doesn't resolve
This commit is contained in:
parent
14e8b12307
commit
1c0aa6c358
|
@ -767,8 +767,10 @@ int main(int argc, char** argv) {
|
||||||
}
|
}
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
char* rbase = realpath(base, NULL);
|
char* rbase = realpath(base, NULL);
|
||||||
strncpy(base, rbase, PATH_MAX);
|
if (rbase) {
|
||||||
free(rbase);
|
strncpy(base, rbase, PATH_MAX);
|
||||||
|
free(rbase);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct CInemaTestList tests;
|
struct CInemaTestList tests;
|
||||||
|
|
Loading…
Reference in New Issue