shithub: ft²

Download patch

ref: 976b6bb80a6b04f209d13f670a941645fe0a89c7
parent: d87935aea0b340cd0c512d237b0e72c503a37300
author: Olav Sørensen <[email protected]>
date: Sun Aug 30 15:57:28 EDT 2020

Fix crash if period reaches a value of 1 with Amiga periods enabled

Not sure if this is even possible...

--- a/src/ft2_header.h
+++ b/src/ft2_header.h
@@ -12,7 +12,7 @@
 #endif
 #include "ft2_replayer.h"
 
-#define PROG_VER_STR "1.31"
+#define PROG_VER_STR "1.32"
 
 // do NOT change these! It will only mess things up...
 
--- a/src/ft2_scopes.h
+++ b/src/ft2_scopes.h
@@ -9,8 +9,8 @@
 #define SCOPE_FRAC_SCALE (1ULL << SCOPE_FRAC_BITS)
 #define SCOPE_FRAC_MASK (SCOPE_FRAC_SCALE-1)
 
-// just about max safe bits, don't mess with it!
-#define SCOPE_DRAW_FRAC_BITS 20
+// *absolute* max safe bits (Amiga periods, period 1), don't mess with it!
+#define SCOPE_DRAW_FRAC_BITS 19
 #define SCOPE_DRAW_FRAC_SCALE (1UL << SCOPE_DRAW_FRAC_BITS)
 #define SCOPE_DRAW_FRAC_MASK (SCOPE_DRAW_FRAC_SCALE-1)