Ticket #1693: 0009-fix-expand-size-of-player_race-weight-fields.patch

File 0009-fix-expand-size-of-player_race-weight-fields.patch, 1.1 KB (added by daniel.santos, 7 years ago)

fix problem with troll weight not fitting into byte value

  • src/player/types.h

    From fa7f077a55588f672018132a43815fc9a5314178 Mon Sep 17 00:00:00 2001
    From: Daniel Santos <daniel.santos@pobox.com>
    Date: Mon, 22 Oct 2012 17:43:34 -0500
    Subject: [PATCH v2 09/12] fix: expand size of player_race weight fields
    
    without this change, the trolls' weight was messed up
    ---
     src/player/types.h |    8 ++++----
     1 files changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/src/player/types.h b/src/player/types.h
    index 7de08e8..7b218f2 100644
    a b typedef struct player_race 
    248248         
    249249        byte m_b_ht;            /* base height (males) */ 
    250250        byte m_m_ht;            /* mod height (males) */ 
    251         byte m_b_wt;            /* base weight (males) */ 
    252         byte m_m_wt;            /* mod weight (males) */ 
     251        u16b m_b_wt;            /* base weight (males) */ 
     252        u16b m_m_wt;            /* mod weight (males) */ 
    253253         
    254254        byte f_b_ht;            /* base height (females) */ 
    255255        byte f_m_ht;            /* mod height (females) */ 
    256         byte f_b_wt;            /* base weight (females) */ 
    257         byte f_m_wt;            /* mod weight (females) */ 
     256        u16b f_b_wt;            /* base weight (females) */ 
     257        u16b f_m_wt;            /* mod weight (females) */ 
    258258         
    259259        byte infra;                     /* Infra-vision range */ 
    260260