diff --git a/linenoise.c b/linenoise.c
index 266d2af..7bc0261 100644
--- a/linenoise.c
+++ b/linenoise.c
@@ -1138,7 +1138,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);
}