summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/h5dump/h5dump.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 0c87b17..c24b2d4 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1274,8 +1274,11 @@ dump_all(hid_t group, const char *name, void * op_data)
if (*(int *)op_data != H5G_UNKNOWN && statbuf.type != *(int *) op_data)
goto done;
-
+#ifdef WIN32
+ tmp = malloc(strlen(prefix)+strlen(name)+2);
+#else
tmp = malloc(strlen(prefix) + strlen(name) + 1);
+#endif
strcpy(tmp, prefix);
switch (statbuf.type) {