mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 14:35:03 +01:00
Fixed regular expression for int
Previous regular expression allowed numbers like "-1-1-4" and would throw exceptions during runtime.
This commit is contained in:
parent
c48aa4f3c9
commit
9bc4ddd546
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ import java.util.regex.Matcher;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
public class Utilities {
|
||||
public static Pattern pattern = Pattern.compile("[\\-0-9]+");
|
||||
public static Pattern pattern = Pattern.compile("-?[0-9]+");
|
||||
public static SecureRandom random = new SecureRandom();
|
||||
public static Random fastRandom = new Xoroshiro128PlusRandom(random.nextLong());
|
||||
|
||||
|
|
Loading…
Reference in a new issue