From: compudj Date: Wed, 8 Feb 2006 15:58:33 +0000 (+0000) Subject: fix sequence pop bug X-Git-Tag: v0.12.20~1965 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b0f04dc324c20f52f4673d23390b317939a64b9a;p=lttv.git fix sequence pop bug git-svn-id: http://ltt.polymtl.ca/svn@1524 04897980-b3bd-0310-b5e0-8ef037075253 --- 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]; }