OSDN Git Service

Win8.1は暫定的にWin8と同じ扱いとする
[applistation/AppliStation.git] / na-get-lib / NaGet.Packages / VersionComparetor.cs
index 6d94fda..f500d3b 100644 (file)
@@ -71,8 +71,8 @@ namespace NaGet.Packages
                                        apos ++; bpos ++;\r
                                }\r
                                \r
-                               if (a[apos] == '0') apos ++;\r
-                               if (b[bpos] == '0') bpos ++;\r
+                               if (apos < alen && a[apos] == '0') apos ++;\r
+                               if (bpos < blen && b[bpos] == '0') bpos ++;\r
                                \r
                                while ((apos < alen) && (bpos < blen) &&\r
                                       char.IsDigit(a[apos]) && char.IsDigit(b[bpos])) {\r