diff --git a/linenoise.c b/linenoise.c
index dcc171e..d2a72af 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -996,7 +996,7 @@ void linenoisePrintKeyCodes(void) {
if (memcmp(quit,"quit",sizeof(quit)) == 0) break;
printf("'%c' %02x (%d) (type quit to exit)\n",
- isprint(c) ? c : '?', (int)c, (int)c);
+ isprint((int) c) ? c : '?', (int)c, (int)c);
printf("\r"); /* Go left edge manually, we are in raw mode. */
fflush(stdout);
}