listdic: fix an old bug with the -x option

This commit is contained in:
Olivier Teulière 2012-11-29 19:39:01 +01:00
parent d9e85c99ed
commit 6a70d28d28

View file

@ -108,9 +108,10 @@ static void printHexa(const Dictionary &iDic)
{ {
ee.e = *reinterpret_cast<const DicEdge*>(iDic.getEdgeAt(i)); ee.e = *reinterpret_cast<const DicEdge*>(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), (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));
} }
} }