Permalink
Browse files

Fix printing non-ascii chars in --quoted format for nanomsg

  • Loading branch information...
1 parent 624c483 commit 41fc2a210164eacd2305d1439bee7fa79cf3569d @tailhook tailhook committed Feb 12, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 tools/nanocat.c
View
2 tools/nanocat.c
@@ -408,7 +408,7 @@ void nn_print_message (nn_options_t *options, char *buf, int buflen)
if (isprint (*buf)) {
fputc (*buf, stdout);
} else {
- fprintf (stdout, "\\x%02x", *buf);
+ fprintf (stdout, "\\x%02x", (unsigned char)*buf);
}
}
}

0 comments on commit 41fc2a2

Please sign in to comment.