summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index dbc8879..d25e9bb 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -408,7 +408,7 @@ h5tools_ncols(const char *s)
* Robb Matzke, 1999-09-29
* If a new prefix is printed then the current element number is set back
* to zero.
- * pvn, 2004-06-30
+ * pvn, 2004-07-08
* Added support for printing array indices:
* the indentation is printed before the prefix (printed one indentation
* level before)
@@ -472,9 +472,14 @@ h5tools_simple_prefix(FILE *stream, const h5dump_t *info,
for (i = 0; i < indentlevel; i++){
/*we already made the indent for the array indices case */
- if (!info->pindex)
- fputs(h5tools_str_fmt(&prefix, 0, info->line_indent), stream);
+ if (!info->pindex) {
+ fputs(h5tools_str_fmt(&prefix, 0, info->line_indent), stream);
templength += h5tools_str_len(&prefix);
+ }
+ else {
+ /*we cannot count the prefix for the array indices case */
+ templength += h5tools_str_len(&str);
+ }
}
ctx->cur_column = ctx->prev_prefix_len = templength;