mirror of
https://github.com/simon987/sist2.git
synced 2025-04-17 17:26:48 +00:00
Bug fix
This commit is contained in:
parent
ebfd7e03ce
commit
94c617fdc3
@ -122,10 +122,10 @@ if (WITH_SIST2)
|
|||||||
|
|
||||||
target_compile_options(sist2
|
target_compile_options(sist2
|
||||||
PRIVATE
|
PRIVATE
|
||||||
# -Ofast
|
-Ofast
|
||||||
# -march=native
|
# -march=native
|
||||||
# -fno-stack-protector
|
-fno-stack-protector
|
||||||
# -fomit-frame-pointer
|
-fomit-frame-pointer
|
||||||
)
|
)
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(
|
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);
|
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';
|
*(args->script + info.st_size) = '\0';
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user