Fix: merged from https://github.com/zsaleeba/picoc/pulls?q=is%3Aopen+is%3Apr
This commit is contained in:
parent
7938c89856
commit
145ca1a3a8
|
@ -107,7 +107,7 @@ char *PlatformReadFile(Picoc *pc, const char *FileName)
|
|||
fclose(InFile);
|
||||
|
||||
if ((ReadText[0] == '#') && (ReadText[1] == '!')) {
|
||||
for (p = ReadText; (*p != '\r') && (*p != '\n'); ++p) {
|
||||
for (p = ReadText; (*p != '\0') && (*p != '\r') && (*p != '\n'); ++p) {
|
||||
*p = ' ';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ TESTS= 00_assignment.test \
|
|||
66_printf_undefined.test \
|
||||
67_macro_crash.test \
|
||||
68_return.test \
|
||||
|
||||
69_shebang_script.test \
|
||||
|
||||
include csmith/Makefile
|
||||
include jpoirier/Makefile
|
||||
|
@ -72,6 +72,9 @@ include jpoirier/Makefile
|
|||
@if [ "x`echo $* | grep args`" != "x" ]; \
|
||||
then \
|
||||
../picoc $*.c - arg1 arg2 arg3 arg4 2>&1 >$*.output; \
|
||||
elif [ "x`echo $* | grep script`" != "x" ]; \
|
||||
then \
|
||||
../picoc -s $*.c 2>&1 >$*.output; \
|
||||
else \
|
||||
../picoc $*.c 2>&1 >$*.output; \
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue