degesch: fix /invite

This commit is contained in:
2015-06-18 22:30:18 +02:00
parent bdad7bd7c2
commit 8eb31ad2e1
2 changed files with 33 additions and 7 deletions

View File

@@ -70,6 +70,17 @@ str_vector_find (const struct str_vector *v, const char *s)
return -1;
}
static char *
str_vector_steal (struct str_vector *self, size_t i)
{
// TODO: str_vector_remove() is then just free(str_vector_steal())
hard_assert (i < self->len);
char *tmp = self->vector[i];
memmove (self->vector + i, self->vector + i + 1,
(self->len-- - i) * sizeof *self->vector);
return tmp;
}
static int
strncasecmp_ascii (const char *a, const char *b, size_t n)
{