Skip to content

Commit

Permalink
Fix crash in scenario selection menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhilkinSerg committed Dec 29, 2020
1 parent 83c437b commit b419692
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/newcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2107,8 +2107,10 @@ tab_direction set_scenario( avatar &u, points_left &points,
const int w_location_h = 3;
const int w_vehicle_h = 3;
const int w_initial_date_h = 6;
const int w_flags_h = iContentHeight -
( w_sorting_h + w_profession_h + w_location_h + w_vehicle_h + w_initial_date_h );
const int w_flags_h = clamp<int>( 0,
iContentHeight -
( w_sorting_h + w_profession_h + w_location_h + w_vehicle_h + w_initial_date_h ),
iContentHeight );
w_sorting = catacurses::newwin( w_sorting_h, second_column_w, origin );
origin += point( 0, w_sorting_h );

Expand Down

0 comments on commit b419692

Please sign in to comment.