From b0f04dc324c20f52f4673d23390b317939a64b9a Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 8 Feb 2006 15:58:33 +0000 Subject: [PATCH] fix sequence pop bug git-svn-id: http://ltt.polymtl.ca/svn@1524 04897980-b3bd-0310-b5e0-8ef037075253 --- genevent-new/parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/genevent-new/parser.c b/genevent-new/parser.c index 785cb652..84a0b5f4 100644 --- a/genevent-new/parser.c +++ b/genevent-new/parser.c @@ -1495,7 +1495,8 @@ void sequence_push(sequence_t *t, void *elem) void *sequence_pop(sequence_t *t) { - return t->array[t->position--]; + if(t->position == 0) printf("Error : trying to pop an empty sequence"); + return t->array[--t->position]; } -- 2.34.1