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

Map renderer crash due to off by one error #279

Closed
4 tasks done
bitnimble opened this issue Jul 16, 2023 · 2 comments · Fixed by #280
Closed
4 tasks done

Map renderer crash due to off by one error #279

bitnimble opened this issue Jul 16, 2023 · 2 comments · Fixed by #280
Labels
bug Something isn't working

Comments

@bitnimble
Copy link
Contributor

Checks

  • I have searched the existing issues and no issue is describing my issue
  • I have checked the FAQ
  • I have checked the documentation
  • I have installed the latest version

The problem

map.py has an off-by-one error when rendering dashed lines that end up causing a divide by zero:

start = position / length
. I guess this is just a rare case when somebody's map specifically has two points to be rendered that are on top of each other.

When length is 0, it'll still perform the loop and crash.

Updated it to while position < length: locally and it now works perfectly on my map.

On which deebot vacuum you have the issue?

Deebot T9

Which version of the deebot-client are you using?

2.0.1

Country

ww

Continent

au

Anything in the logs that might be useful for us?

No response

Additional information

No response

@bitnimble bitnimble added the bug Something isn't working label Jul 16, 2023
@edenhaus
Copy link
Contributor

If you would like you can directly create a PR for this fix

@bitnimble
Copy link
Contributor Author

yep cool will do, just wanted to double check first in case you might already have a fix, or if there's something else about this code that i'm not aware of 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants