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:
parent
de013693fd
commit
aad9327bd4
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue