From: Holger Schemel Date: Thu, 21 Feb 2019 07:24:04 +0000 (+0100) Subject: fixed using (manually changed) invalid values for editor zoom tile size X-Git-Tag: 4.1.3.0~55 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=0fefbeaf965f087a359f7ae6845bcefff7a71389;p=rocksndiamonds.git fixed using (manually changed) invalid values for editor zoom tile size --- diff --git a/src/editor.c b/src/editor.c index 093b2290..dc1b528f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -8402,6 +8402,9 @@ static void InitZoomLevelSettings(int zoom_tilesize) ed_tilesize = setup.auto_setup.editor_zoom_tilesize; ed_tilesize_default = DEFAULT_EDITOR_TILESIZE; + // make sure that tile size is always a power of 2 + ed_tilesize = (1 << log_2(ed_tilesize)); + if (level.game_engine_type == GAME_ENGINE_TYPE_MM) { ed_tilesize = DEFAULT_EDITOR_TILESIZE_MM;