From b0772fc9f726d7e70e5da2d20c34744589ca2c09 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 793ead67..4f176e20 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.65 2007/10/23 19:54:35 christos Exp $") +FILE_RCSID("@(#)$File: readelf.c,v 1.66 2007/11/07 21:26:32 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.40.0