to display the contents of databases containing UTF-8 strings
on signed char architectures:
for example on i386 and amd64, UTF-8 bytes are negative...
-/* $OpenBSD: dbm_dump.c,v 1.2 2016/08/30 22:20:03 schwarze Exp $ */
+/* $OpenBSD: dbm_dump.c,v 1.3 2024/05/14 00:31:48 schwarze Exp $ */
/*
* Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
*
printf("(NULL)");
return;
}
- if (**cp <= (char)NAME_MASK) {
+ if ((unsigned char)**cp <= NAME_MASK) {
putchar('[');
if (**cp & NAME_FILE)
putchar('f');