diff options
| -rwxr-xr-x | playground/native-calculate.sh | 2 | ||||
| -rw-r--r-- | src_c/common.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/playground/native-calculate.sh b/playground/native-calculate.sh index 06756ba..d47035e 100755 --- a/playground/native-calculate.sh +++ b/playground/native-calculate.sh @@ -2,7 +2,7 @@ . $(dirname -- "$0")/env.sh -exec $ROOT_PATH/build/c/opcut-calculate \ +exec $ROOT_PATH/src_py/opcut/bin/linux-opcut-calculate \ --method greedy \ --output result.json \ params.json diff --git a/src_c/common.c b/src_c/common.c index 66b826d..066ff5a 100644 --- a/src_c/common.c +++ b/src_c/common.c @@ -436,7 +436,7 @@ int opcut_result_write(opcut_result_t *result, FILE *stream) { if (fputs(",\"used\":[", stream) < 0) return OPCUT_ERROR; - for (opcut_used_t *used; used; used = used->next) { + for (opcut_used_t *used = result->used; used; used = used->next) { if (write_used(used, stream)) return OPCUT_ERROR; @@ -449,7 +449,8 @@ int opcut_result_write(opcut_result_t *result, FILE *stream) { if (fputs("],\"unused\":[", stream) < 0) return OPCUT_ERROR; - for (opcut_unused_t *unused; unused; unused = unused->next) { + for (opcut_unused_t *unused = result->unused; unused; + unused = unused->next) { if (write_unused(unused, stream)) return OPCUT_ERROR; |
