mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-28 03:34:06 +00:00
Replace line fixing symptoms by assertions, to reveal the cause
This commit is contained in:
parent
4dbf7c7a52
commit
3f975e92cd
|
@ -79,8 +79,9 @@ void picture_blit_pixels(const pixel *orig, pixel *dst,
|
|||
unsigned orig_stride, unsigned dst_stride)
|
||||
{
|
||||
unsigned y, x;
|
||||
//Fix problem with reading unitialized memory
|
||||
if (width > orig_stride) width = orig_stride;
|
||||
//There is absolutely no reason to have a width greater than the source or the destination stride.
|
||||
assert(width <= orig_stride);
|
||||
assert(width <= dst_stride);
|
||||
|
||||
for (y = 0; y < height; ++y) {
|
||||
for (x = 0; x < width; ++x) {
|
||||
|
|
Loading…
Reference in a new issue