summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-08 21:51:12 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-08 21:51:12 (GMT)
commit636fc2be4a9197f3bf4881f26f0dffc938ad261e (patch)
treed9de50277fd59f08f3c1e702cb4f8a6ee131220c /tools/lib
parent3b01516da6b94d2b9685f6e871f195557935df12 (diff)
downloadhdf5-636fc2be4a9197f3bf4881f26f0dffc938ad261e.zip
hdf5-636fc2be4a9197f3bf4881f26f0dffc938ad261e.tar.gz
hdf5-636fc2be4a9197f3bf4881f26f0dffc938ad261e.tar.bz2
[svn-r8841] Purpose:
bug fix Description: when printing array indices , the calculation of the current column was not done correctly Solution: Platforms tested: linux AIX solaris Misc. update:
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 358c77a..f3099fe 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -422,9 +422,13 @@ 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 {
+ templength += h5tools_str_len(&str);
+ }
}
ctx->cur_column = ctx->prev_prefix_len = templength;