Story Viewer: another attempt to fix UB

This commit is contained in:
Charles Dang 2017-04-17 01:31:25 +11:00
parent c294484cda
commit 5c0a043f79

View file

@ -442,7 +442,7 @@ void story_viewer::draw_callback(window& window)
return;
}
unsigned short new_alpha = utils::clamp<unsigned short>(fade_step_ * 25.5, 0, ALPHA_OPAQUE);
unsigned short new_alpha = utils::clamp<short>(fade_step_ * 25.5, 0, ALPHA_OPAQUE);
find_widget<scroll_label>(&window, "part_text", false).set_text_alpha(new_alpha);
// The text stack also needs to be marked dirty so the background panel redraws correctly.