mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Disregarding errors when parsing numbers for LessThan and GreaterThan comparisons in the KeyCheck block.
This commit is contained in:
@@ -5,6 +5,7 @@ using RuriLib.LS;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace RuriLib
|
||||
{
|
||||
|
||||
@@ -26,7 +26,11 @@ namespace RuriLib.Models
|
||||
/// <returns>Whether the comparison is valid</returns>
|
||||
public bool CheckKey(BotData data)
|
||||
{
|
||||
return ConditionChecker.Verify(LeftTerm, Condition, RightTerm, data);
|
||||
try
|
||||
{
|
||||
return ConditionChecker.Verify(LeftTerm, Condition, RightTerm, data);
|
||||
}
|
||||
catch { return false; } // Return false if e.g. we can't parse the number for a LessThan/GreaterThan comparison.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user