summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2014-04-25 18:47:25 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2014-04-25 18:47:25 +0200
commit98ec9d51141b60ed1b1a3cfe07132c60a05fd166 (patch)
treef22f0c03ec662b88705c68cbbbef9e3ac5c6489d
parent2f50ad527869535106d946008fb1e09f25f3acae (diff)
sfeed: fix numeric entity parsing
Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
-rw-r--r--sfeed.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfeed.c b/sfeed.c
index 9effd14..7166b2f 100644
--- a/sfeed.c
+++ b/sfeed.c
@@ -171,8 +171,8 @@ entitytostr(const char *e, char *buffer, size_t bufsiz) {
if(*e != '&' || bufsiz < 5) /* doesnt start with & */
return 0;
- if(*(e+1) == '#') {
- e++;
+ if(e[1] == '#') {
+ e += 2; /* skip &# */
if(*e == 'x') {
e++;
l = strtol(e, NULL, 16); /* hex */