Resolve bug/not a bug status in 1995/cdua

What was once thought to be a bug or possible bug is actually a feature.
With a more lucid head I see that in a certain condition (which I noted
in bugs.md) it very clearly is intentional that one should have to hit a
key (it says return as '<RET>' but it uses getchar() via the pointer
'm'). The condition is !(g-a). I do not know the purpose of it but
INABIAF and so should not be changed.

Thus it's not a possible bug or bug but a feature. This is noted also in
the README.md file.
This commit is contained in:
Cody Boone Ferguson committed 2023-09-25 12:06:59 -07:00
1 parent 767e40657c
commit 7183971943
2 files changed
+10 -15

No files matched your search

+4 -5
View File
@@ -1,10 +1,6 @@
# Best Output # Best Output
Carlos Duarte Carlos Duarte
Instituto Superior Tecnico
Largo da Igreja, 5 R/C DTo
Damaia
2720 Amadora
Portugal Portugal
@@ -30,8 +26,11 @@ For this alternate, slower version, please see below.
``` ```
## INABIAF - it's not a bug it's a feature! :-)
NOTE: sometimes the program needs you to press enter a second time to continue NOTE: sometimes the program needs you to press enter a second time to continue
solving the maze. See [bugs.md](/bugs.md) for more details. solving the maze. This is a feature, not a bug. See [bugs.md](/bugs.md) for more
details.
### Alternate code: ### Alternate code:
+6 -10
View File
@@ -890,21 +890,17 @@ Since it works there is no need to fix this except for a challenge to yourself.
## [1995/cdua](1995/cdua/cdua.c) ([README.md](1995/cdua/README.md)) ## [1995/cdua](1995/cdua/cdua.c) ([README.md](1995/cdua/README.md))
## STATUS: possible bug (possibly depending on system) - please help test and if necessary fix ## STATUS: INABIAF - please **DO NOT** fix
This did not originally compile under macOS and after it did compile under This did not originally compile under macOS and after it did compile under
macOS, it crashed. [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) macOS, it crashed. [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson)
fixed these problems. fixed these problems.
However he observed that sometimes the program asks the user to hit return a It should be noted however that there is a condition where the program will
second time to resume solving the maze. It does not always happen. It doesn't prompt you to press return again. This was thought to be a bug but looking at
seem to be related to making it work under macOS as all that did was removing the code it can clearly be seen that if `g - a` is 0 then the message is
some invalid prototypes and use `printf()` instead of the invalid pointer to it supposed to be printed again and one is supposed to press a key as at that point
(incompatible type). Besides that it happened under linux where there was no it calls `getchar()` via the pointer `m`. So this is a feature not a bug.
compilation error or crash.
It's possible this is no longer an issue but if it's encountered again please
let us know or offer a fix.
## [1995/vanschnitz](1995/vanschnitz/vanschnitz.c) ([README.md](1995/vanschnitz/README.md)) ## [1995/vanschnitz](1995/vanschnitz/vanschnitz.c) ([README.md](1995/vanschnitz/README.md))