karelzak / mutt-kz

mutt-kz is DEPRECATED in favor of neomutt project.
https://neomutt.org
Other
296 stars 51 forks source link

Fix displaying non-ASCII characters in status line #71

Closed kiryl closed 10 years ago

kiryl commented 10 years ago

Commit bf395dc5784f has changed 'buf' to char from unsigned char. It means if char type is signed, all non-ASCII characters will be negative.

The problem is that addch() takes chtype as an argument which is unsigned long. And implicit cast of negative char to unsigned long produces very big number.

The bug leads to weird effects like blinking non-ASCII characters on my machine.

Signed-off-by: Kirill A. Shutemov kirill@shutemov.name