Mercurial > hg > early-roguelike
changeset 183:7f5f5f1ba09c
srogue: initialize some pointers.
MSVC complained that they might be used uninitialized.
author | John "Elwin" Edwards |
---|---|
date | Sat, 01 Aug 2015 21:23:55 -0400 |
parents | 1fe660009fd3 |
children | 7c059ec2a2c7 |
files | srogue/pack.c srogue/passages.c |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/srogue/pack.c Fri Jul 31 20:12:33 2015 -0400 +++ b/srogue/pack.c Sat Aug 01 21:23:55 2015 -0400 @@ -29,7 +29,7 @@ bool silent; { reg struct linked_list *ip, *lp; - reg struct object *obj, *op; + reg struct object *obj, *op = NULL; bool from_floor; char delchar; @@ -292,7 +292,7 @@ char *purpose; int type; { - reg struct linked_list *obj, *pit, *savepit; + reg struct linked_list *obj, *pit, *savepit = NULL; struct object *pob; int ch, och, anr, cnt;
--- a/srogue/passages.c Fri Jul 31 20:12:33 2015 -0400 +++ b/srogue/passages.c Sat Aug 01 21:23:55 2015 -0400 @@ -24,7 +24,7 @@ do_passages() { - reg struct rdes *r1, *r2; + reg struct rdes *r1, *r2 = NULL; reg int i, j; reg int roomcount; static struct rdes { @@ -126,7 +126,7 @@ conn(r1, r2) int r1, r2; { - reg struct room *rpf, *rpt; + reg struct room *rpf, *rpt = NULL; reg char rmt, direc; reg int distance, turn_spot, turn_distance, rm; struct coord curr, turn_delta, spos, epos;