Merge pull request #356 from vially/fix-bounds-check

Fix resize bounds check in rootson
This commit is contained in:
Tony Crisci 2017-10-29 19:41:47 -04:00 committed by GitHub
commit 57efc3417f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -34,13 +34,13 @@ static void resize(struct roots_view *view, uint32_t width, uint32_t height) {
if (width < state->min_width) { if (width < state->min_width) {
width = state->min_width; width = state->min_width;
} else if (state->max_width > 0 && } else if (state->max_width > 0 &&
width < state->max_width) { width > state->max_width) {
width = state->max_width; width = state->max_width;
} }
if (height < state->min_height) { if (height < state->min_height) {
height = state->min_height; height = state->min_height;
} else if (state->max_height > 0 && } else if (state->max_height > 0 &&
height < state->max_height) { height > state->max_height) {
height = state->max_height; height = state->max_height;
} }