1
0
mirror of https://github.com/TREX-CoE/qmckl.git synced 2024-11-03 20:54:09 +01:00

Better Error handling in point

This commit is contained in:
Anthony Scemama 2022-11-18 14:08:16 +01:00
parent 0f1cf7d147
commit 20da9cc7d8

View File

@ -283,6 +283,13 @@ qmckl_set_point (qmckl_context context,
return QMCKL_NULL_CONTEXT;
}
if (num <= 0) {
return qmckl_failwith( context,
QMCKL_INVALID_ARG_4,
"qmckl_set_point",
"Number of points should be >0.");
}
if (size_max < 3*num) {
return qmckl_failwith( context,
QMCKL_INVALID_ARG_4,