Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
vor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
af711b4
)
* rocks.c (init_buckets): oops, we weren't allocating big enough arrays.
author
Joshua Grams
<josh@qualdan.com>
Thu, 5 Jan 2006 00:09:57 +0000
(
00:09
+0000)
committer
Joshua Grams
<josh@qualdan.com>
Thu, 5 Jan 2006 00:09:57 +0000
(
00:09
+0000)
rocks.c
patch
|
blob
|
history
diff --git
a/rocks.c
b/rocks.c
index
a594547
..
0a71ebf
100644
(file)
--- a/
rocks.c
+++ b/
rocks.c
@@
-56,8
+56,10
@@
bucket(int x, int y, int p)
void
init_buckets(void)
{
- bw = (XSIZE+2*grid_size-1) / grid_size;
- bh = (YSIZE+2*grid_size-1) / grid_size;
+ int scr_grid_w = (XSIZE+2*grid_size-1) / grid_size;
+ int scr_grid_h = (YSIZE+2*grid_size-1) / grid_size;
+ bw = 1 + scr_grid_w + 1;
+ bh = 1 + scr_grid_h + 1;
n_buckets = bw * bh;
rock_buckets[0] = malloc(n_buckets * sizeof(struct rock_struct *));