diff --git a/kernel/trunk/gui/window.inc b/kernel/trunk/gui/window.inc index cbd42c23f2..ca5710b058 100644 --- a/kernel/trunk/gui/window.inc +++ b/kernel/trunk/gui/window.inc @@ -173,6 +173,10 @@ align 4 syscall_display_settings.02: dec ebx mov esi, ecx + cmp edx, 192 + jnae @f + mov edx, 192 ; max size + @@: and edx, 255 mov edi, common_colours mov ecx, edx @@ -183,6 +187,10 @@ syscall_display_settings.02: align 4 syscall_display_settings.03: mov edi, ecx + cmp edx, 192 + jnae @f + mov edx, 192 ; max size + @@: and edx, 255 mov esi, common_colours mov ecx, edx