Fix 2018/algmyr to not segfault on NULL file
Now it just exits 1 if a file cannot be opened. I do have a concern with
this type of fix which I will bring up on GitHub but it seems better
anyway to not crash with invalid input unless the entry should crash.
The fact the author noted that invalid paths as a limitation suggests in
this case that it is reasonable to fix. There are other limitations /
bugs the author mentions but perhaps those should not be fixed. That
remains to be seen I guess.
I can also now confirm that this entry does indeed work as expected; I
could not test it with commit ced8177ef9
but I had to test it here to make sure the changes did not affect the
functionality.
The original source, which has a really nice layout, can be found in
prog.alt.c and is referenced in the README.md. It can be built by make
alt.
This commit is contained in:
1 parent
70f08cc681
commit
0f52b84bc8
4 files changed
+91
-5
No files matched your search
@@ -115,8 +115,8 @@ CSRC= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
|
||||
|
||||
#################
|
||||
|
||||
Reference in new issue
Block a user