2009-08-06 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mcs / class / Mono.C5 / C5 / arrays / CircularQueue.cs
index 230d81fc4b0936f21db61ab0dcc35e6520e1bca1..4f06c0c714395c535b48a2a1c6fbe1135fdf6285 100644 (file)
@@ -1,4 +1,3 @@
-#if NET_2_0\r
 /*\r
  Copyright (c) 2003-2006 Niels Kokholm and Peter Sestoft\r
  Permission is hereby granted, free of charge, to any person obtaining a copy\r
@@ -120,7 +119,8 @@ namespace C5
         if (i < 0 || i >= size)\r
           throw new IndexOutOfRangeException();\r
         i = i + front;\r
-        return array[i >= size ? i - size : i];\r
+        //Bug fix by Steve Wallace 2006/02/10\r
+        return array[i >= array.Length ? i - array.Length : i];\r
       }\r
     }\r
 \r
@@ -332,5 +332,4 @@ namespace C5
       return true;\r
     }\r
   }\r
-}\r
-#endif\r
+}
\ No newline at end of file