summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-07-31 22:38:04 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-07-31 22:38:04 +0200
commit0a4281c4599bc46a321f34fc7c5e6695c713c56e (patch)
tree9e0c6770a3990a0635c2b402d41311bb74a4fd2e
parent4c678a04defbf750d9b902c0477620401f74a86b (diff)
xml: fix xml_namedentitytostr loop
-rw-r--r--xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xml.c b/xml.c
index bca7a83..c33ca0c 100644
--- a/xml.c
+++ b/xml.c
@@ -285,7 +285,7 @@ xml_namedentitytostr(const char *e, char *buf, size_t bufsiz)
if (*e != '&')
return 0;
- for (i = 0; sizeof(entities) / sizeof(*entities); i++) {
+ for (i = 0; i < sizeof(entities) / sizeof(*entities); i++) {
/* NOTE: compares max 6 chars */
if (!strncasecmp(e, entities[i].entity, 6)) {
buf[0] = entities[i].c;