Commit 5ca08eb1 authored by jingbo.wang's avatar jingbo.wang

Less 当real为0时,忽略比较

parent 276994a3
...@@ -19,6 +19,9 @@ func (Compare) Less(alter string, real []string) bool { ...@@ -19,6 +19,9 @@ func (Compare) Less(alter string, real []string) bool {
lastIndex := len(real) - 1 lastIndex := len(real) - 1
for i, r := range real { for i, r := range real {
if i != 0 || i != lastIndex { if i != 0 || i != lastIndex {
if r == "0" {
continue
}
rs = rs && (r < alter) rs = rs && (r < alter)
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment