summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnno Boland (Gottox) <gottox@s01.de>2008-07-03 08:55:01 +0200
committerEnno Boland (Gottox) <gottox@s01.de>2008-07-03 08:55:01 +0200
commit1b0c0b16d11ec50ae1c7c3355634c06ee53047d5 (patch)
tree50a42bdd2884fef2afe1229e817116cef9283ed8
parentc499a2afe19c02a3826d2f61bc3a747e6fdbffdf (diff)
small fixes reported by Johannes. Thx btw :)
-rw-r--r--smu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/smu.c b/smu.c
index a1f1d17..641303a 100644
--- a/smu.c
+++ b/smu.c
@@ -10,7 +10,7 @@
#include <ctype.h>
#define LENGTH(x) sizeof(x)/sizeof(x[0])
-#define ADDC(b,i) if(i % BUFSIZ == 0) { b = realloc(b, (i + BUFSIZ) * sizeof(b)); if(!b) eprint("Malloc failed."); } b[i]
+#define ADDC(b,i) if(i % BUFSIZ == 0) { b = realloc(b, (i + BUFSIZ) * sizeof(char)); if(!b) eprint("Malloc failed."); } b[i]
typedef int (*Parser)(const char *, const char *, int);
typedef struct {
@@ -163,9 +163,9 @@ dohtml(const char *begin, const char *end, int newblock) {
p++;
tag = p;
for(; isalnum(*p) && p < end; p++);
+ tagend = p;
if(p > end || tag == tagend)
return 0;
- tagend = p;
while((p = strstr(p, "</")) && p < end) {
p += 2;
if(strncmp(p, tag, tagend - tag) == 0 && p[tagend - tag] == '>') {