We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9a0aa3 commit 296c7d4Copy full SHA for 296c7d4
go/05_array/array.go
@@ -34,7 +34,7 @@ func (this *Array) Len() uint {
34
35
//判断索引是否越界
36
func (this *Array) isIndexOutOfRange(index uint) bool {
37
- if index >= this.length {
+ if index >= uint(cap(this.data)) {
38
return true
39
}
40
return false
0 commit comments