1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00

Fixes bug that frees console_image handle in Clear

Fixes a bug that would free the console_image handle in the freeallimages() function
This commit is contained in:
Zachary Spriggs 2021-03-16 15:34:43 -04:00 committed by GitHub
parent d39dab006f
commit 3c58f611a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18608,7 +18608,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
static int32 i;
//note: handles 0 & -1(1) are reserved
for (i=2;i<nextimg;i++){
if (img[i].valid){
if (img[i].valid && i != abs(console_image)){
if ((img[i].flags&IMG_SCREEN)==0){//The SCREEN's pages cannot be freed!
sub__freeimage(-i,1);
}