srogue: fix an uninitialized variable.

In wanderer(), if rp == hr, the loop could test ch before its value has
been set.  Initializing ch to '-' now causes the loop to repeat until
a location is found.
This commit is contained in:
John "Elwin" Edwards 2015-08-04 11:39:49 -04:00
parent de013693fd
commit aad9327bd4

View file

@ -193,7 +193,7 @@ char type;
*/
wanderer()
{
reg int ch;
reg int ch = '-';
reg struct room *rp, *hr = player.t_room;
reg struct linked_list *item;
reg struct thing *tp;