From e585142003e8b2fa3705a2a72212307ccc5338df Mon Sep 17 00:00:00 2001 From: matusz Date: Fri, 17 Apr 2009 18:27:41 +0000 Subject: [PATCH] gtk port: quit on unsupported savetype in command line option --- desmume/src/gtk/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desmume/src/gtk/main.cpp b/desmume/src/gtk/main.cpp index 02124f85f..e50bee632 100644 --- a/desmume/src/gtk/main.cpp +++ b/desmume/src/gtk/main.cpp @@ -272,6 +272,11 @@ fill_configured_features( struct configured_features *config, if (argc > 2) goto error; + if (config->savetype < 0 || config->savetype > 6) { + g_printerr("Accepted savetypes are from 0 to 6.\n"); + goto error; + } + if (config->firmware_language < -1 || config->firmware_language > 5) { g_printerr("Firmware language must be set to a value from 0 to 5.\n"); goto error;