scan-build #14: remove divizion by zero

- calculate dummy value if condition is met
- will only draw one pixel in the loop