Skip to content

Commit f79fc52

Browse files
authored
Merge pull request #7427 from PCL-Community/#7422
fix(validate): 超过 Int 存储范围
2 parents 15c04d4 + 865f5a9 commit f79fc52

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Plain Craft Launcher 2/Modules/Base/ModValidate.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ Public Class ValidateInteger
113113
Me.Max = Max
114114
End Sub
115115
Public Overrides Function Validate(Str As String) As String
116+
If Str.Length > 9 Then Return "请输入一个大小合理的数字!"
116117
Dim Valed As Integer
117118
If Not Integer.TryParse(Str, Valed) Then Return "请输入一个整数!"
118-
If Str.Length > 9 Then Return "请输入一个大小合理的数字!"
119119
If Valed > Max Then Return "不可超过 " & Max & "!"
120120
If Valed < Min Then Return "不可低于 " & Min & "!"
121121
Return ""

0 commit comments

Comments
 (0)