mirror of
https://github.com/xzeldon/htop.git
synced 2025-01-31 09:07:25 +03:00
Hide degree character without wide ncurses support
This commit is contained in:
parent
f0a9dfc37e
commit
f913680020
2
CRT.c
2
CRT.c
@ -80,13 +80,13 @@ static const char* initDegreeSign(void) {
|
||||
#ifdef HAVE_LIBNCURSESW
|
||||
if (CRT_utf8)
|
||||
return "\xc2\xb0";
|
||||
#endif
|
||||
|
||||
static char buffer[4];
|
||||
// this might fail if the current locale does not support wide characters
|
||||
int r = snprintf(buffer, sizeof(buffer), "%lc", 176);
|
||||
if (r > 0)
|
||||
return buffer;
|
||||
#endif
|
||||
|
||||
return "";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user