Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

bug discovered #30

Open
JJC3561 opened this issue Feb 23, 2019 · 0 comments
Open

bug discovered #30

JJC3561 opened this issue Feb 23, 2019 · 0 comments

Comments

@JJC3561
Copy link

JJC3561 commented Feb 23, 2019

I hope this might help someone out there ...

file topic.py. line 263: if index < 0 or len(topic_list) >= index: # THIS IS WRONG

should be
if index < 0 or index >= len(topic_list): #THIS IS CORRECT
or
if index < 0 or len(topic_list) <= index: #THIS IS CORRECT

[this is a mild bug :]

-- in normal situation, it will fail to "insertBefore()" and instead it will do "append()", when adding a new topic.
-- in unusual situations, if one tries to "insertBefore()" a new topic with a (mistakenly) large index, it will crash instead of fail over to "append()"

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

No branches or pull requests

1 participant