diff options
author | 2012-07-27 15:20:26 +0000 | |
---|---|---|
committer | 2012-07-27 15:20:26 +0000 | |
commit | 9a10e406565c21d841a349156e981c1355eef37f (patch) | |
tree | eef03fbb0dd5865b66fc96980546e0faf75ca04f /src/emu/emucore.h | |
parent | 98e99f50e504ea1ca718e772f7a022531e91a64a (diff) |
Properly call va_end() before throwing exceptions in fatalerror functions (no whatsnew)
Diffstat (limited to 'src/emu/emucore.h')
-rw-r--r-- | src/emu/emucore.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emu/emucore.h b/src/emu/emucore.h index 8ea6c5a7ccb..b3104c6167b 100644 --- a/src/emu/emucore.h +++ b/src/emu/emucore.h @@ -374,16 +374,18 @@ inline void fatalerror(const char *format, ...) { va_list ap; va_start(ap, format); - throw emu_fatalerror(format, ap); + emu_fatalerror error(format, ap); va_end(ap); + throw error; } inline void fatalerror_exitcode(running_machine &machine, int exitcode, const char *format, ...) { va_list ap; va_start(ap, format); - throw emu_fatalerror(exitcode, format, ap); + emu_fatalerror error(exitcode, format, ap); va_end(ap); + throw error; } |