TeamSyndi / syndibox

SyndiBox - A powerful text engine for dialog-heavy Godot projects
MIT License
91 stars 9 forks source link

[BUG] Divide by 0 #28

Closed zaknafean closed 4 years ago

zaknafean commented 4 years ago

Describe the bug Syndibox crashes with divide by 0 error if top left margin = 0. This is easily worked around by changing the value, but was also the very first thing to happen to me when I used the plugin.

To Reproduce Steps to reproduce the behavior:

  1. Add Syndibox Node to scene
  2. Start Scene
  3. Crash

Expected behavior No crashes and for it to behave as normal

Screenshots If applicable, add screenshots to help explain your problem. image

Version

Additional context Technically the node is about 4 deep from scene root, and is a child of a non-control node. This may be part of the cause.

Sudospective commented 4 years ago

oh thats bad

I'll get to fixing that, thank you for sharing this

zaknafean commented 4 years ago

Playing around with this more, it also happens when its a child of control nodes too. So its really just the 0 itself thats the problem.

I-Have-No-Idea-What-IAmDoing commented 4 years ago

It probably because of my profile picture bug fix

I-Have-No-Idea-What-IAmDoing commented 4 years ago

I think i just found a fix, i am adding it to my pull request right now