xmind-sdk-python
xmind-sdk-python copied to clipboard
bug discovered
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()"