This commit is contained in:
Anton Dolozin 2025-10-06 16:30:53 +02:00
parent b69493904e
commit 132224e588

View File

@ -66,6 +66,11 @@ void process_operations(struct stack* stack) {
}
} else {
char *endptr;
if (line[0] == '.')
{ printf("bad input\n");
return;
}
float val = strtof(line, &endptr);
if (endptr == line) {
printf("bad input\n");