Skip to content

Commit

Permalink
In the character creation screen, fix scrolling the skill screen causing
Browse files Browse the repository at this point in the history
a crash when the skill list is smaller than the skill window height.
  • Loading branch information
DanmakuDan committed Sep 24, 2017
1 parent 547cd99 commit 78bdcf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/newcharacter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ tab_direction set_skills(WINDOW *w, player *u, points_left &points)
5, getmaxx(w) - 1, BORDER_COLOR, true );

int first_i, end_i, base_y;
if (cur_pos < iHalf) {
if (iContentHeight - 1 > num_skills || cur_pos < iHalf) {
first_i = 0;
end_i = iContentHeight;
base_y = 5;
Expand Down

0 comments on commit 78bdcf1

Please sign in to comment.