Skip to content

Commit

Permalink
Fix chance of bad type creation in CI (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala authored Aug 24, 2023
1 parent c987fd6 commit a3d6d88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_rest_vol.c
Original file line number Diff line number Diff line change
Expand Up @@ -17726,7 +17726,7 @@ generate_random_datatype(H5T_class_t parent_class)
#if 0
if (0 == (rand() % 2)) {
#endif
if ((datatype = H5Tcreate(H5T_STRING, (size_t)(rand() % STRING_TYPE_MAX_SIZE))) < 0) {
if ((datatype = H5Tcreate(H5T_STRING, (size_t)(rand() % STRING_TYPE_MAX_SIZE) + 1)) < 0) {
H5_FAILED();
printf(" couldn't create fixed-length string datatype\n");
goto error;
Expand Down

0 comments on commit a3d6d88

Please sign in to comment.