From afe5654e207960eec30e7b0affe1827f07207533 Mon Sep 17 00:00:00 2001 From: Qianqian Fang Date: Tue, 20 Sep 2022 22:08:08 -0400 Subject: [PATCH] make flag compatible with zmat v0.9.8 convention --- src/zmatlib.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zmatlib.c b/src/zmatlib.c index b227c7a..988aee4 100644 --- a/src/zmatlib.c +++ b/src/zmatlib.c @@ -182,9 +182,9 @@ int zmat_run(const size_t inputsize, unsigned char* inputstr, size_t* outputsize return -1; } - nthread = (flags.param.nthread == 0) ? 1 : flags.param.nthread; - shuffle = (flags.param.shuffle == 0) ? 1 : flags.param.shuffle; - typesize = (flags.param.typesize == 0) ? 4 : flags.param.typesize; + nthread = (flags.param.nthread == 0 || flags.param.nthread == -1) ? 1 : flags.param.nthread; + shuffle = (flags.param.shuffle == 0 || flags.param.shuffle == -1) ? 1 : flags.param.shuffle; + typesize = (flags.param.typesize == 0 || flags.param.typesize == -1) ? 4 : flags.param.typesize; clevel = (flags.param.clevel == 0) ? 0 : flags.param.clevel; if (clevel) {