Mercurial > sos > sos
changeset 9:f8493aa1b207
Fixed a fencepost error
author | Jonathan Pevarnek <pevarnj@gmail.com> |
---|---|
date | Wed, 09 Mar 2011 13:43:20 -0500 |
parents | 25b2b501a5fa |
children | 2356e9d59bc4 |
files | src/stack.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/stack.c Wed Mar 09 12:08:48 2011 -0500 +++ b/src/stack.c Wed Mar 09 13:43:20 2011 -0500 @@ -15,7 +15,7 @@ void push(struct Stack *stack, eltType val) { - if(stack->top < 100) stack->values[++stack->top] = val; + if(stack->top < (100 - 1)) stack->values[++stack->top] = val; } void initStack(struct Stack *stack)