# HG changeset patch # User Frank Benoit # Date 1211228384 -7200 # Node ID cba62ee36290505d83333b54fb4476d936b2e4d5 # Parent 679fb4a215dca5e724095615f79458ad84a27700 Fix bug in System.arraycopy when called for overlapping array ranges diff -r 679fb4a215dc -r cba62ee36290 dwt/dwthelper/System.d --- a/dwt/dwthelper/System.d Mon May 19 14:35:49 2008 +0200 +++ b/dwt/dwthelper/System.d Mon May 19 22:19:44 2008 +0200 @@ -80,8 +80,15 @@ debug{validCheck(src.length - srcPos, dest.length - destPos, len);} if(src is dest){ - for(int i=0; i=0; --i){ + dest[destPos+i] = src[srcPos+i]; + } } }else{ dest[destPos..(len+destPos)] = src[srcPos..(len+srcPos)];