Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list:remove 保护处理 #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

wangyhzzz
Copy link

@wangyhzzz wangyhzzz commented Apr 21, 2022

list remove的一个bug,重现步骤如下:

  1. new list ,push A
  2. clear list
  3. push B,push C
  4. list remove A
    这个时候,A已不在列表中了,但强行连接prev 和next 将会把list错误的设置为空列表。
    在这里加一个判断,以防止此类问题发生

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant