From: fennecdjay Date: Wed, 9 Oct 2019 22:36:10 +0000 (+0200) Subject: :bug: Fix match map X-Git-Tag: nightly~2198^2~40 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=698ea5a5d6279f489d8888d5f0615ea7195a4a57;p=gwion.git :bug: Fix match map --- diff --git a/include/match.h b/include/match.h index dbdb6a2f..d28f5381 100644 --- a/include/match.h +++ b/include/match.h @@ -7,11 +7,13 @@ struct Match_ { ANN static inline void match_map(struct Match_ * const match, Exp e) { const Map map = &match->map; + Exp next = NULL; map_init(map); do { + next = e->next; e->next = NULL; map_set(map, (vtype)e, 0); - } while((e = e->next)); + } while((e = next)); } ANN static inline void match_unmap(struct Match_ * const match) {