diff options
Diffstat (limited to 'src/map/magic-interpreter-parser.c')
-rw-r--r-- | src/map/magic-interpreter-parser.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/magic-interpreter-parser.c b/src/map/magic-interpreter-parser.c index cab0426..66fb120 100644 --- a/src/map/magic-interpreter-parser.c +++ b/src/map/magic-interpreter-parser.c @@ -2994,7 +2994,10 @@ fun_expr(char *name, int args_nr, expr_t **args, int line, int column) static spell_t * new_spell(spellguard_t *guard) { + static int spell_counter = 0; + spell_t *retval = calloc(1, sizeof(spell_t)); + retval->index = ++spell_counter; retval->spellguard = guard; return retval; } |