修复top为nil
This commit is contained in:
@@ -62,7 +62,7 @@ func New() *Stack {
|
||||
|
||||
func (as *Stack) Clear() {
|
||||
as.size = 0
|
||||
as.top = nil
|
||||
as.top = &Node{elements: make([]interface{}, 8, 8), cur: -1}
|
||||
as.cache = nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user