This commit is contained in:
Joseph Poirier 2015-06-13 15:49:34 -05:00
parent 7938c89856
commit 145ca1a3a8
2 changed files with 5 additions and 2 deletions

View file

@ -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 = ' ';
}
}

View file

@ -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