1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 06:27:17 +00:00

no more crash when view by negative distance

This commit is contained in:
Zeno Rogue 2020-09-17 04:37:16 +02:00
parent b72414ae2a
commit c4ca0840be

View File

@ -605,6 +605,7 @@ EX void viewdist_configure_dialog() {
dialog::add_action([] () { dialog::add_action([] () {
scrolling_distances = false; scrolling_distances = false;
dialog::editNumber(first_distance, 0, 3000, 1, 0, XLAT("display distances from"), ""); dialog::editNumber(first_distance, 0, 3000, 1, 0, XLAT("display distances from"), "");
dialog::bound_low(0);
}); });
int id = 0; int id = 0;
@ -679,6 +680,7 @@ void expansion_analyzer::view_distances_dialog() {
scrolltime %= scrollspeed; scrolltime %= scrollspeed;
} }
lastticks = SDL_GetTicks(); lastticks = SDL_GetTicks();
if(first_distance < 0) first_distance = 0;
dynamicval<color_t> dv(distcolors[0], forecolor); dynamicval<color_t> dv(distcolors[0], forecolor);
dialog::init(""); dialog::init("");