summaryrefslogtreecommitdiff
path: root/blastem.c
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2018-12-30 23:14:00 -0800
committerMike Pavone <pavone@retrodev.com>2018-12-30 23:14:00 -0800
commitdd6094093b5fa7af547f6efc304d596886ad73d3 (patch)
tree4748e0153d9a259d8b94fecbb53f9dfa346bf5bb /blastem.c
parentdb976c80ab79912f994b748e6338093d7623febe (diff)
Fix crash when passed a filename with no extension
Diffstat (limited to 'blastem.c')
-rw-r--r--blastem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blastem.c b/blastem.c
index 684b91f..cef9371 100644
--- a/blastem.c
+++ b/blastem.c
@@ -137,7 +137,7 @@ uint32_t load_rom(const char * filename, void **dst, system_type *stype)
{
uint8_t header[10];
char *ext = path_extension(filename);
- if (!strcasecmp(ext, "zip")) {
+ if (ext && !strcasecmp(ext, "zip")) {
free(ext);
return load_rom_zip(filename, dst);
}