From fb3c8624b5c088486062f3c7b23695e80c6e40de Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sun, 14 Aug 2016 22:56:18 +0900 Subject: [PATCH] Fix cast mistake in array lookup --- ext/hamlit/hescape.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/hamlit/hescape.c b/ext/hamlit/hescape.c index e4cc1554..15010aca 100644 --- a/ext/hamlit/hescape.c +++ b/ext/hamlit/hescape.c @@ -78,7 +78,7 @@ hesc_escape_html(char **dest, const char *buf, size_t size) while (i < size) { // Loop here to skip non-escaped characters fast. - while (i < size && (esc_i = HTML_ESCAPE_TABLE[(int)buf[i]]) == 0) + while (i < size && (esc_i = HTML_ESCAPE_TABLE[(unsigned char)buf[i]]) == 0) i++; if (i < size && esc_i) {