mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
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)
|
||
|---|---|---|
| .. | ||
| cpp.rs | ||
| rust.rs | ||