fix
This commit is contained in:
parent
76573731c6
commit
4df573bbc7
|
@ -14,15 +14,12 @@ func GetCurrentSize(clientSize uint32) uint32 {
|
|||
}
|
||||
//小于最小尺寸则返回规则最小尺寸
|
||||
if clientSize < newSizeArray[0] {
|
||||
return clientSize
|
||||
return newSizeArray[0]
|
||||
}
|
||||
for k, v := range newSizeArray {
|
||||
if v == clientSize {
|
||||
for _, v := range newSizeArray {
|
||||
if v >= clientSize {
|
||||
return v
|
||||
}
|
||||
if clientSize > v && k < lenNewSize-1 && clientSize < newSizeArray[k+1] {
|
||||
return newSizeArray[k+1]
|
||||
}
|
||||
}
|
||||
return clientSize
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user