all repos — mgba @ 0902dbdd398c6d344cda44843566786aaed39ec2

mGBA Game Boy Advance Emulator

Test: Fix crash if directory doesn't resolve
Vicki Pfau vi@endrift.com
Tue, 21 Jul 2020 01:09:48 -0700
commit

0902dbdd398c6d344cda44843566786aaed39ec2

parent

39203a0dafcb93542227e86b86229d7ad7ac7f00

1 files changed, 4 insertions(+), 2 deletions(-)

jump to
M src/platform/test/cinema-main.csrc/platform/test/cinema-main.c

@@ -767,8 +767,10 @@ goto cleanup;

} #ifndef _WIN32 char* rbase = realpath(base, NULL); - strncpy(base, rbase, PATH_MAX); - free(rbase); + if (rbase) { + strncpy(base, rbase, PATH_MAX); + free(rbase); + } #endif struct CInemaTestList tests;