Handle invalid param2 in presets.lua (#623)

This commit is contained in:
Jude Melton-Houghton 2022-09-11 08:50:26 -04:00 committed by GitHub
parent 68171b3d8d
commit 121082859f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,8 @@ local rules_buttonlike = {
}
local function rules_from_dir(ruleset, dir)
if not dir then return {} end
if dir.x == 1 then return ruleset.xp end
if dir.y == 1 then return ruleset.yp end
if dir.z == 1 then return ruleset.zp end