mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix build on windows
This commit is contained in:
parent
289192f595
commit
ae3277b17f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user