]> source.dussan.org Git - gitea.git/commitdiff
Quick fix on #476
authorUnknwon <joe2010xtmf@163.com>
Wed, 17 Sep 2014 00:58:06 +0000 (20:58 -0400)
committerUnknwon <joe2010xtmf@163.com>
Wed, 17 Sep 2014 00:58:06 +0000 (20:58 -0400)
modules/git/version.go

index 546397aa62667fe26612919209bc7ec5285ed54f..9908d11e2013989f4e90083cfb675906999119dd 100644 (file)
@@ -35,7 +35,7 @@ func ParseVersion(verStr string) (*Version, error) {
                case 1:
                        v.Minor, _ = com.StrTo(s).Int()
                case 2:
-                       v.Patch, _ = com.StrTo(s).Int()
+                       v.Patch, _ = com.StrTo(strings.TrimSpace(s)).Int()
                }
        }
        return v, nil