summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pages.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pages.c b/pages.c
index 9e2a9c0..7f11b76 100644
--- a/pages.c
+++ b/pages.c
@@ -619,12 +619,13 @@ writeposts(const int *posts, size_t totalposts, const char *outfile, int current
{
char num[4] = {0}; /* will never have more than 999 posts */
int girl_variant = 0;
- int used[3] = {-1};
+ int used[3];
snprintf(num, 4, "%d", post);
num[3] = '\0';
fprintf(tmp, "\n<a href='direct/%d.html'>", post);
for (int i = 0; i < strlen(num); i++)
{
+ memset(used, -1, 3*sizeof(int));
girl_variant = rand() % 10;
while (girl_variant == used[0] || girl_variant == used[1] || girl_variant == used[2])
{