]> granicus.if.org Git - strace/commitdiff
Fix wrong offset display in dumpstr
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 22 Feb 2013 14:00:11 +0000 (15:00 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 22 Feb 2013 14:00:11 +0000 (15:00 +0100)
BTW, the new code from prev commit is 5 times faster
than old one :)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util.c

diff --git a/util.c b/util.c
index b398625e4d68d1860962452d85100e3d52d885ad..405670e60ef9a2a85f876a7e5d1ee5e1cd0a6ccf 100644 (file)
--- a/util.c
+++ b/util.c
@@ -724,7 +724,7 @@ dumpstr(struct tcb *tcp, long addr, int len)
                        src++;
                } while (++i & 0xf);
                *dst = '\0';
-               tprintf(" | %05x  %s |\n", i, outbuf);
+               tprintf(" | %05x  %s |\n", i - 16, outbuf);
        }
 }