From 0fefbeaf965f087a359f7ae6845bcefff7a71389 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 21 Feb 2019 08:24:04 +0100 Subject: [PATCH] fixed using (manually changed) invalid values for editor zoom tile size --- src/editor.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.34.1