From ae3277b17fc296c3592245ffcd208857f79e1cd2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Sep 2024 12:13:59 +0530 Subject: [PATCH] Fix build on windows --- src/calibre/ebooks/html_entities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/html_entities.c b/src/calibre/ebooks/html_entities.c index 9dfb8c479c..951f2c30c2 100644 --- a/src/calibre/ebooks/html_entities.c +++ b/src/calibre/ebooks/html_entities.c @@ -75,7 +75,7 @@ is_xml_unsafe(uint32_t codepoint) { return codepoint == '<' || codepoint == '>' || codepoint == '&' || codepoint == '"' || codepoint == '\''; } -static ssize_t +static int convert_entity(const char *entity, const size_t elen, char *output, bool keep_xml_entities) { if (entity[0] == '#') { if (elen < 2) return -1; @@ -99,7 +99,7 @@ convert_entity(const char *entity, const size_t elen, char *output, bool keep_xm static size_t add_entity(const char *entity, const size_t elen, char *output, bool keep_xml_entities) { - ssize_t ans; + int ans; if (elen > 64 || elen < 3 || (ans = convert_entity(entity + 1, elen - 2, output, keep_xml_entities)) < 0) { memcpy(output, entity, elen); return elen;