commit dd83f3ffa357932a71888aedb7e614e829b5e922
parent d54a904d6e0c37bad83371ff434aefa1484f6c89
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 20 Oct 2021 11:15:04 +0200
Merge branch 'release_0.12.1'
Diffstat:
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
@@ -34,6 +34,11 @@ variable to the directory that contains the `boost` include directory.
## Release notes
+### Version 0.12.1
+
+Fix creating a random number proxy generator using the KISS type: this type was
+considered invalid while it is not.
+
### Version 0.12
Ensures C++11 compliance to correct gcc 11 compilation errors. On the other
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
@@ -80,7 +80,7 @@ endif()
################################################################################
set(VERSION_MAJOR 0)
set(VERSION_MINOR 12)
-set(VERSION_PATCH 0)
+set(VERSION_PATCH 1)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
set(SSP_FILES_SRC
diff --git a/src/ssp_rng_proxy.c b/src/ssp_rng_proxy.c
@@ -590,7 +590,7 @@ ssp_rng_proxy_create2
|| !out_proxy
|| !args->sequence_size
|| !args->nbuckets
- || (!args->type && !args->rng)
+ || (args->type == SSP_RNG_TYPE_NULL && !args->rng)
|| args->sequence_pitch < args->sequence_size
|| args->sequence_size < args->nbuckets) {
res = RES_BAD_ARG;
diff --git a/src/test_ssp_rng_proxy.c b/src/test_ssp_rng_proxy.c
@@ -68,6 +68,9 @@ test_creation(void)
CHK(ssp_rng_proxy_get_type(proxy, &type) == RES_OK);
CHK(type == SSP_RNG_THREEFRY);
CHK(ssp_rng_proxy_ref_put(proxy) == RES_OK);
+
+ CHK(ssp_rng_proxy_create(NULL, SSP_RNG_KISS, 4, &proxy) == RES_OK);
+ CHK(ssp_rng_proxy_ref_put(proxy) == RES_OK);
}
static void
@@ -120,6 +123,10 @@ test_creation2(void)
args.nbuckets = 4;
CHK(ssp_rng_proxy_create2(NULL, &args, &proxy) == RES_OK);
CHK(ssp_rng_proxy_ref_put(proxy) == RES_OK);
+
+ args.type = SSP_RNG_KISS;
+ CHK(ssp_rng_proxy_create2(NULL, &args, &proxy) == RES_OK);
+ CHK(ssp_rng_proxy_ref_put(proxy) == RES_OK);
}
static void