1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-02 05:00:38 +00:00

Fix _COPYIMAGE/_FREEIMAGE/_MEM(IMAGE) glitch

Merge pull request #57 from RhoSigma-QB64/development

Fixes #54
This commit is contained in:
Fellippe Heitor 2018-07-28 14:22:19 -03:00 committed by GitHub
commit 708e05e12a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18283,6 +18283,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
i2=newimg();
d=&img[i2];
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
bytes=d->width*d->height*d->bytes_per_pixel;
d->offset=(uint8*)malloc(bytes);