From 74815ed34b51ff0064f368a69d36e9bcc04b3e97 Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Sat, 17 Nov 2007 17:08:27 +0000 Subject: [PATCH] fix core printing. --- src/readelf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/readelf.c b/src/readelf.c index fe362fab..00538373 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -37,7 +37,7 @@ #include "readelf.h" #ifndef lint -FILE_RCSID("@(#)$File: readelf.c,v 1.66 2007/11/07 21:26:32 christos Exp $") +FILE_RCSID("@(#)$File: readelf.c,v 1.67 2007/11/17 17:08:27 christos Exp $") #endif #ifdef ELFCORE @@ -689,8 +689,10 @@ core: &nbuf[doff + prpsoffsets(i)]; for (cp = cname; *cp && isprint(*cp); cp++) continue; + if (cp > cname) + cp--; if (file_printf(ms, ", from '%.*s'", - (int)(cp - cname), cp) == -1) + (int)(cp - cname), cname) == -1) return size; *flags |= FLAGS_DID_CORE; return size; -- 2.50.1