From 2b95da8d10881455200abcb0a40e8e09b21bbb01 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 23 Apr 2024 13:36:32 -0500 Subject: [PATCH] fix tick rate exploit --- src/engine/engine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index b2a4b4428..c062d22c8 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -562,6 +562,9 @@ void DivEngine::initSongWithDesc(const char* description, bool inBase64, bool ol // extra attributes song.subsong[0]->hz=c.getDouble("tickRate",60.0); + if (song.subsong[0]->hz<1.0) song->subsong[0]->hz=1.0; + if (song.subsong[0]->hz>999.0) song->subsong[0]->hz=999.0; + song.author=getConfString("defaultAuthorName",""); }