From 892a9b992f6566a56041862f5cfeba7015f09184 Mon Sep 17 00:00:00 2001 From: zhihua-chen <13683070+zhihua-chen@users.noreply.github.com> Date: Sat, 27 May 2023 11:28:19 -0400 Subject: [PATCH] Rank 1 was left out. Bring it back. A commit in Oct 13, 2019 changed the original rank == 1 comparison to rank > 1. The code segment applies to both situations so we should make it rank >= 1. This change will remove the bug where a rank 1 array of strings gets read as a single fixed length string. --- src/h5_lt.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/h5_lt.hpp b/src/h5_lt.hpp index 8a2aa2f..5af690e 100644 --- a/src/h5_lt.hpp +++ b/src/h5_lt.hpp @@ -1645,7 +1645,7 @@ namespace NodeHDF5 { } args.GetReturnValue().Set(array); H5Tclose(basetype_id); - } else if (rank > 1 && values_dim.get()[0] > 0) { + } else if (rank >= 1 && values_dim.get()[0] > 0) { hid_t dataspace_id = H5S_ALL; hid_t memspace_id = H5S_ALL; size_t typeSize = H5Tget_size(t);