diff options
-rw-r--r-- | src/emu/cheat.c | 14 | ||||
-rw-r--r-- | src/mame/includes/cidelsa.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/cheat.c b/src/emu/cheat.c index ad98a8efa1a..3161ba78e28 100644 --- a/src/emu/cheat.c +++ b/src/emu/cheat.c @@ -1430,6 +1430,13 @@ static script_entry *script_entry_load(running_machine *machine, const char *fil curarg->count = xml_get_attribute_int(argnode, "count", 1); totalargs += curarg->count; + /* max out on arguments */ + if (totalargs > MAX_ARGUMENTS) + { + mame_printf_error("%s.xml(%d): too many arguments (found %d, max is %d)\n", filename, argnode->line, totalargs, MAX_ARGUMENTS); + goto error; + } + /* read the expression */ expression = argnode->value; if (expression == NULL || expression[0] == 0) @@ -1449,13 +1456,6 @@ static script_entry *script_entry_load(running_machine *machine, const char *fil argtailptr = &curarg->next; } - /* max out on arguments */ - if (totalargs > MAX_ARGUMENTS) - { - mame_printf_error("%s.xml(%d): too many arguments (found %d, max is %d)\n", filename, argnode->line, totalargs, MAX_ARGUMENTS); - goto error; - } - /* validate the format against the arguments */ if (!validate_format(filename, entrynode->line, entry)) goto error; diff --git a/src/mame/includes/cidelsa.h b/src/mame/includes/cidelsa.h index 7319203856e..032d4acfbf7 100644 --- a/src/mame/includes/cidelsa.h +++ b/src/mame/includes/cidelsa.h @@ -4,7 +4,7 @@ #include "cpu/cdp1802/cdp1802.h" #define SCREEN_TAG "screen" -#define CDP1802_TAG "cpd1802" +#define CDP1802_TAG "cdp1802" #define CDP1869_TAG "cdp1869" #define AY8910_TAG "ay8910" |