From 6a70d28d28314fc671805d51fc4d005d6e32db0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Teuli=C3=A8re?= Date: Thu, 29 Nov 2012 19:39:01 +0100 Subject: [PATCH] listdic: fix an old bug with the -x option --- dic/listdicmain.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dic/listdicmain.cpp b/dic/listdicmain.cpp index 591b820..3ee8a54 100644 --- a/dic/listdicmain.cpp +++ b/dic/listdicmain.cpp @@ -108,9 +108,10 @@ static void printHexa(const Dictionary &iDic) { ee.e = *reinterpret_cast(iDic.getEdgeAt(i)); - printf("0x%04lx %08x |%4d ptr=%8d t=%d l=%d chr=%2d (%c)\n", + printf("0x%04lx %08x |%4d ptr=%8d t=%d l=%d chr=%2d (%lc)\n", (unsigned long)i*sizeof(ee), (unsigned int)(ee.s), - i, ee.e.ptr, ee.e.term, ee.e.last, ee.e.chr, ee.e.chr + 'a' - 1); + i, ee.e.ptr, ee.e.term, ee.e.last, ee.e.chr, + ee.e.chr == 0 ? L'-' : iDic.getHeader().getCharFromCode(ee.e.chr)); } }