This commit is contained in:
2025-07-25 19:34:51 +02:00
parent 0c3a3f0d75
commit 8f2b4519e2
2 changed files with 39 additions and 30 deletions

View File

@@ -547,8 +547,8 @@ void nni_gpu_copy(nni_gpu *gpu, void *_, nn_component *component, nn_computer *c
// prevent DoS
if(x < 0) x = 0;
if(y < 0) y = 0;
if(w > gpu->currentScreen->width - x) w = gpu->currentScreen->width - x;
if(h > gpu->currentScreen->height - y) y = gpu->currentScreen->height - y;
if(w > gpu->currentScreen->width) w = gpu->currentScreen->width;
if(h > gpu->currentScreen->height) y = gpu->currentScreen->height;
int changes = 0, clears = 0;