Merge pull request #171 from xiaobudongzhang/patch-1

Update array.go
This commit is contained in:
wangzheng0822 2018-11-30 15:47:55 +08:00 committed by GitHub
commit 289e63e2d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,7 @@ func (this *Array) Len() uint {
//判断索引是否越界
func (this *Array) isIndexOutOfRange(index uint) bool {
if index >= this.length {
if index >= uint(cap(this.data)) {
return true
}
return false