diff options
Diffstat (limited to 'src/map/magic-interpreter-parser.y')
-rw-r--r-- | src/map/magic-interpreter-parser.y | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/magic-interpreter-parser.y b/src/map/magic-interpreter-parser.y index a8f7168..deb686d 100644 --- a/src/map/magic-interpreter-parser.y +++ b/src/map/magic-interpreter-parser.y @@ -821,7 +821,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; } |