mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-07-04 06:00:23 +00:00
Fix _COPYIMAGE/_FREEIMAGE/_MEM(IMAGE) glitch
Merge pull request #57 from RhoSigma-QB64/development Fixes #54
This commit is contained in:
commit
708e05e12a
|
@ -18283,6 +18283,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
|
||||||
i2=newimg();
|
i2=newimg();
|
||||||
d=&img[i2];
|
d=&img[i2];
|
||||||
memcpy(d,s,sizeof(img_struct));
|
memcpy(d,s,sizeof(img_struct));
|
||||||
|
img[i2].lock_id=NULL; img[i2].lock_offset=NULL; // force _MEMIMGAGE to get a new lock for the copy
|
||||||
//duplicate pixel data
|
//duplicate pixel data
|
||||||
bytes=d->width*d->height*d->bytes_per_pixel;
|
bytes=d->width*d->height*d->bytes_per_pixel;
|
||||||
d->offset=(uint8*)malloc(bytes);
|
d->offset=(uint8*)malloc(bytes);
|
||||||
|
|
Loading…
Reference in a new issue