static void blobmsg_format_string(struct strbuf *s, const char *str)
{
- const char *p, *last = str, *end = str + strlen(str);
+ const unsigned char *p, *last, *end;
char buf[8] = "\\u00";
+ end = (unsigned char *) str + strlen(str);
blobmsg_puts(s, "\"", 1);
- for (p = str; *p; p++) {
+ for (p = (unsigned char *) str, last = p; *p; p++) {
char escape = '\0';
int len;
continue;
if (p > last)
- blobmsg_puts(s, last, p - last);
+ blobmsg_puts(s, (char *) last, p - last);
last = p + 1;
buf[1] = escape;
blobmsg_puts(s, buf, len);
}
- blobmsg_puts(s, last, end - last);
+ blobmsg_puts(s, (char *) last, end - last);
blobmsg_puts(s, "\"", 1);
}