This commit is contained in:
simon 2019-11-12 22:11:50 -05:00
parent ebfd7e03ce
commit 94c617fdc3
2 changed files with 9 additions and 4 deletions

View File

@ -122,10 +122,10 @@ if (WITH_SIST2)
target_compile_options(sist2
PRIVATE
# -Ofast
-Ofast
# -march=native
# -fno-stack-protector
# -fomit-frame-pointer
-fno-stack-protector
-fomit-frame-pointer
)
TARGET_LINK_LIBRARIES(

View File

@ -126,7 +126,12 @@ int index_args_validate(index_args_t *args, int argc, const char **argv) {
}
args->script = malloc(info.st_size + 1);
read(fd, args->script, info.st_size);
res = read(fd, args->script, info.st_size);
if (res == -1) {
fprintf(stderr, "Error reading script file '%s': %s\n", args->script_path, strerror(errno));
return 1;
}
*(args->script + info.st_size) = '\0';
close(fd);
}