File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
1
--[[
2
2
Description: Toggle FX bypass by track and slot
3
- Version: 1.32
3
+ Version: 1.33
4
4
Author: Lokasenna
5
5
Donation: https://paypal.me/Lokasenna
6
6
Changelog:
7
- Fix for me still being an idiot and trying to make words be numbers
7
+ Fix for crashes if someone types in a decimal value by mistake
8
8
Links:
9
9
Forum thread https://forum.cockos.com/showthread.php?p=1993961
10
10
Lokasenna's Website http://forum.cockos.com/member.php?u=10417
@@ -68,7 +68,11 @@ local function toggle_bypass()
68
68
69
69
-- Get the track
70
70
-- Track number?
71
- if tonumber (track ) then
71
+ if tonumber (track ) then
72
+
73
+ -- Force an integer until/unless I come up with some sort of multiple track syntax
74
+ track = math.floor ( tonumber (track ) )
75
+
72
76
tr = tonumber (track ) > 0 and reaper .GetTrack (0 , tonumber (track ) - 1 )
73
77
or reaper .GetMasterTrack (0 )
74
78
@@ -104,7 +108,8 @@ local function toggle_bypass()
104
108
105
109
if tonumber (slot ) then
106
110
107
- s = tonumber (slot ) - 1
111
+ -- Force an integer until/unless I come up with some sort of multiple FX syntax
112
+ s = math.floor ( tonumber (slot ) ) - 1
108
113
109
114
elseif tostring (slot ) then
110
115
You can’t perform that action at this time.
0 commit comments