Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
C++: fix a bug in which a substraction could overflow
There was an image like this: ```slint height: 40px Image { width: parent.width; height: self.source.height * 1px; source: @image-url("...."); } ``` The `y` propery ended inlined like so: `(40 - the_image.source.get().size().height)/float(2)` but since height was `unsigned` the C++ rules means that the operation happens as unsigned and we have an overflow. and `y` turned out to be very big instead of slightly negative (for image whose height was larger than 40)
- Loading branch information