From 845a3be5d28365527f858fcdaba910aca0065284 Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 8 Feb 2006 15:58:41 +0000 Subject: [PATCH] fix sequence pop bug git-svn-id: http://ltt.polymtl.ca/svn@1525 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ltt/branches/poly/ltt/parser.c b/ltt/branches/poly/ltt/parser.c index 785cb652..84a0b5f4 100644 --- a/ltt/branches/poly/ltt/parser.c +++ b/ltt/branches/poly/ltt/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