From 6866ff7a9877270fc4399b968ce0de8b1f73ae0a Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 16 Dec 2017 14:40:18 -0500 Subject: [PATCH] Fix out-of-bounds traits error on Anama trait (thanks to Ir the Great for this patch) --- src/game/boe.specials.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/boe.specials.cpp b/src/game/boe.specials.cpp index fe5ff2ed..45db645f 100644 --- a/src/game/boe.specials.cpp +++ b/src/game/boe.specials.cpp @@ -3184,8 +3184,8 @@ void affect_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type, break; case eSpecType::AFFECT_TRAITS: if(pc_num >= 100) break; - if(spec.ex1a < 0 || spec.ex1a > 15) { - showError("Trait is out of range (0 - 15)."); + if(spec.ex1a < 0 || spec.ex1a > 16) { + showError("Trait is out of range (0 - 16)."); break; } for(short i = 0; i < 6; i++) @@ -3501,8 +3501,8 @@ void ifthen_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type, } break; case eSpecType::IF_TRAIT: - if(spec.ex1a < 0 || spec.ex1a > 15) { - showError("Invalid trait (0...15)"); + if(spec.ex1a < 0 || spec.ex1a > 16) { + showError("Invalid trait (0...16)"); } else { int i = trait_present(eTrait(spec.ex1a)), j = minmax(1, party_size(true), spec.ex2a); if(spec.ex2b == -2 && i <= j) *next_spec = spec.ex1b;