Skip to content

Commit

Permalink
Fix GCC warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Oct 10, 2023
1 parent d897299 commit e20fd2c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/i_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,16 +314,19 @@ void I_Error(const char *error, ...)
M_snprintf(email, sizeof(email),
DOOMRETRO_REPORTEMAIL "?subject=" DOOMRETRO_ERRORCAPTION "&body=%s", buffer);

ShellExecute(NULL, "open", email, NULL, NULL, SW_SHOWNORMAL);
if (!ShellExecute(NULL, "open", email, NULL, NULL, SW_SHOWNORMAL))
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__HAIKU__)
M_snprintf(email, sizeof(email),
"xdg-open " DOOMRETRO_REPORTEMAIL "?subject=" DOOMRETRO_ERRORCAPTION "&body=%s", buffer);
system(email);

if (!system(email))
#elif defined(__APPLE__)
M_snprintf(email, sizeof(email),
"open " DOOMRETRO_REPORTEMAIL "?subject=" DOOMRETRO_ERRORCAPTION "&body=%s", buffer);
system(email);

if (!system(email))
#endif
/* nop */;
}

exit(-1);
Expand Down

0 comments on commit e20fd2c

Please sign in to comment.