summaryrefslogtreecommitdiff
path: root/snow.c
diff options
context:
space:
mode:
Diffstat (limited to 'snow.c')
-rw-r--r--snow.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/snow.c b/snow.c
index b63cf20..4140d87 100644
--- a/snow.c
+++ b/snow.c
@@ -1,4 +1,3 @@
-/* $Id$ */
/*
* Copyright (c) 2010 Dimitri Sokolyuk <demon@dim13.org>
*
@@ -92,10 +91,10 @@ main()
}
pp = calloc(1, sizeof(struct particle));
- pp->dy = arc4random() % 3;
+ pp->dy = arc4random() % (nitems(flake) - 1);
pp->y = 0;
pp->x = arc4random() % COLS;
- pp->c = flake[arc4random() % (nitems(flake) - 1)];
+ pp->c = flake[pp->dy];
LIST_INSERT_HEAD(&head, pp, link);
refresh();