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

Unbinding map does not adjust map_cache index #328

Closed
techfg opened this issue Jan 18, 2021 · 0 comments · Fixed by #329
Closed

Unbinding map does not adjust map_cache index #328

techfg opened this issue Jan 18, 2021 · 0 comments · Fixed by #329
Labels

Comments

@techfg
Copy link
Collaborator

techfg commented Jan 18, 2021

Make sure to add all the information needed to understand the bug so that someone can help. If the info is missing we'll add the 'needs author feedback' label and close the issue until there is enough information.

Describe the bug
When unbinding a, imagemapster clears the map information. During this process, it adjusts its internal map_cache, however there is a bug when manipulating the indexes of the remaining maps in the cache.

This issue only manifests when there are multiple maps under imagemapster control. After the bug is triggered, imagemapster will not correctly manage its internal cache and behavior will be unreliable.

To Reproduce
Steps to reproduce the behavior:

  1. Apply imagemapster to multiple maps (e.g. 0,1,2)
  2. Check the internal data structure map_cache[i].index property and it will correctly indicate 0,1,2
  3. Unbind a map "in the middle of the array of maps" (e.g. 1)
  4. Check the internal data structure map_cache[i].index property and it will incorrectly indicate [0]=0,[1]=2 when it should be [0]=0,[1]=1

Expected behavior
The map_cache[i] index should correspond to the index of the map in the cache

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
N/A

techfg added a commit that referenced this issue Jan 18, 2021
techfg added a commit that referenced this issue Jan 18, 2021
techfg added a commit that referenced this issue Jan 18, 2021
@techfg techfg added the bug label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant