diff --git a/src/templates_front/templator_front.org b/src/templates_front/templator_front.org index 672b465..430e7c2 100644 --- a/src/templates_front/templator_front.org +++ b/src/templates_front/templator_front.org @@ -493,7 +493,7 @@ trexio_exit_code trexio_read_$group$_$group_dset$(trexio_t* file, $group_dset_dt if ($group_dset$ == NULL) return TREXIO_INVALID_ARG_2; trexio_exit_code rc; - uint64_t $group_dset_dim$ = -1; + uint64_t $group_dset_dim$ = 0; switch (file->back_end) { @@ -513,7 +513,7 @@ trexio_exit_code trexio_read_$group$_$group_dset$(trexio_t* file, $group_dset_dt if (rc != TREXIO_SUCCESS) return rc; - if ($group_dset_dim$ <= 0L) return TREXIO_INVALID_NUM; + if ($group_dset_dim$ == 0L) return TREXIO_INVALID_NUM; uint32_t rank = $group_dset_rank$; uint64_t dims[$group_dset_rank$] = {$group_dset_dim_list$}; @@ -545,7 +545,7 @@ trexio_exit_code trexio_write_$group$_$group_dset$(trexio_t* file, const $group_ if ($group_dset$ == NULL) return TREXIO_INVALID_ARG_2; trexio_exit_code rc; - uint64_t $group_dset_dim$ = -1; + uint64_t $group_dset_dim$ = 0; switch (file->back_end) { case TREXIO_TEXT: @@ -563,7 +563,7 @@ trexio_exit_code trexio_write_$group$_$group_dset$(trexio_t* file, const $group_ } if (rc != TREXIO_SUCCESS) return rc; - if ($group_dset_dim$ <= 0L) return TREXIO_INVALID_NUM; + if ($group_dset_dim$ == 0L) return TREXIO_INVALID_NUM; uint32_t rank = $group_dset_rank$; uint64_t dims[$group_dset_rank$] = {$group_dset_dim_list$};