diff --git a/du3/program.c b/du3/program.c index 8ebc785..305fa21 100644 --- a/du3/program.c +++ b/du3/program.c @@ -2,7 +2,7 @@ #include #include #include -#define STACK_SIZE 10000 +#define STACK_SIZE 10 struct stack{ float values[STACK_SIZE]; @@ -65,6 +65,10 @@ void process_operations(struct stack* stack) { return; } } else { + if(stack->size == STACK_SIZE){ + printf("full stack\n"); + return; + } char *endptr; if (line[0] == '.') { printf("bad input\n");