From ad90aecee7bc9d8075431fa706ff73fe95bd536f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 16 Mar 2023 14:42:10 +0100 Subject: [PATCH] fixed crash in edgelen --- util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.cpp b/util.cpp index e88d062f..ec69ff0b 100644 --- a/util.cpp +++ b/util.cpp @@ -388,7 +388,7 @@ cld exp_parser::parse(int prio) { else if(number == "psl_steps") res = cgi.psl_steps; else if(number == "single_step") res = cgi.single_step; else if(number == "step") res = hdist0(tC0(currentmap->adj(cwt.at, 0))); - else if(number == "edgelen") res = hdist(get_corner_position(cwt.at, 0), get_corner_position(cwt.at, 1)); + else if(number == "edgelen") { start_game(); res = hdist(get_corner_position(cwt.at, 0), get_corner_position(cwt.at, 1)); } else if(number == "mousey") res = mousey; else if(number == "random") res = randd(); else if(number == "mousez") res = cld(mousex - current_display->xcenter, mousey - current_display->ycenter) / cld(current_display->radius, 0);