diff dwt/dwthelper/array.d @ 122:2e671fa40eec

Ported dwt.dnd, dwt.opengl, dwt.printing and dwt.program
author Jacob Carlborg <doob@me.com>
date Wed, 31 Dec 2008 21:01:13 +0100
parents d32621bf0f90
children 63a09873578e
line wrap: on
line diff
--- a/dwt/dwthelper/array.d	Wed Dec 31 16:50:37 2008 +0100
+++ b/dwt/dwthelper/array.d	Wed Dec 31 21:01:13 2008 +0100
@@ -62,11 +62,11 @@
  * Throws: AssertException if the length of the array is 0
  *         AssertException if the $(D_CODE index) is greater than the length of the array 
  */
-T elementAt (T) (T[] arr, size_t index)
+T elementAt (T) (T[] arr, int index)
 in
 {
     assert(arr.length > 0);
-    assert(index < arr.length);
+    assert(index > -1 && index < arr.length);
 }
 body
 {