From 698ea5a5d6279f489d8888d5f0615ea7195a4a57 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 10 Oct 2019 00:36:10 +0200 Subject: [PATCH] :bug: Fix match map --- include/match.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- 2.43.0