mirror of
https://github.com/simon987/sist2.git
synced 2025-04-16 08:56:45 +00:00
Bug fix
This commit is contained in:
parent
ebfd7e03ce
commit
94c617fdc3
@ -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(
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user