From de6f6c6ad08ec348e1c5b17e9ea45aaea0b63748 Mon Sep 17 00:00:00 2001 From: ov075wu Date: Sun, 12 Oct 2025 19:12:41 +0200 Subject: [PATCH] refresh --- du3/output/program.exe | Bin 62136 -> 62136 bytes du3/program.c | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/du3/output/program.exe b/du3/output/program.exe index b2d48d3eeed8051f7a03af7f420a6e9aa29d324e..70992614874e125a9f661e403922ae16b6177705 100644 GIT binary patch delta 22 ecmdn-lzGQf<_R6l)em1!?Dl2SdAae{y^jEgeGGj7 delta 22 ecmdn-lzGQf<_R6l?`5A&?Dl1vt-A5ny^jEbzzfp= diff --git a/du3/program.c b/du3/program.c index dfb1200..dee0e9f 100644 --- a/du3/program.c +++ b/du3/program.c @@ -1,6 +1,7 @@ #include #include #include +#include #define STACK_SIZE 10 @@ -10,7 +11,13 @@ struct stack { }; void push_stack(struct stack* stack, float value) { - + if (stack->size >= STACK_SIZE) { + printf("Error!\n"); + exit(1); + } + stack->values[stack->size] = value; + stack->size++; + } float pop_stack(struct stack* stack) {