summaryrefslogtreecommitdiff
path: root/src/birth.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2013-09-08 16:29:01 +0200
committerBardur Arantsson <bardur@scientician.net>2013-09-27 14:46:43 +0200
commite639beb074dec2d641b13bdb4f2d080b50dd55cb (patch)
treec191c1b81de7c5aa3679c5ad398e7095b48f888f /src/birth.cc
parent5a60ce1f8ab8a6a34cf55b637dd601b5d4422197 (diff)
Fix undefined behavior for HP calculation at birth
Diffstat (limited to 'src/birth.cc')
-rw-r--r--src/birth.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/birth.cc b/src/birth.cc
index 51cd092b..8612efdc 100644
--- a/src/birth.cc
+++ b/src/birth.cc
@@ -810,6 +810,9 @@ static void player_wipe(void)
/* Hack -- zero the struct */
WIPE(p_ptr, player_type);
+ /* Level 1 is the first level */
+ p_ptr->lev = 1;
+
/* Not dead yet */
p_ptr->lives = 0;