Add support for "muting" accounts
[blerg.git] / database / tags.c
index dc6bac8..0d7a27f 100644 (file)
@@ -106,6 +106,11 @@ struct blergref * tag_list(const char *tag, uint64_t offset, int *count, int dir
 
        if (!valid_tag_name(tag + 1))
                return NULL;
+
+       if (!(direction == 1 || direction == -1)) {
+               fprintf(stderr, "Invalid direction: %d\n", direction);
+               return NULL;
+       }
        
        switch(tag[0]) {
        case '#':