From b71d10ab6334a26b35cd7d1156a9924676d048da Mon Sep 17 00:00:00 2001 From: Ry Date: Sat, 24 Dec 2022 01:29:00 -0800 Subject: [PATCH] kernel: Ensure new_window doesn't clobber r0 --- kernel/window/window.asm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/window/window.asm b/kernel/window/window.asm index 12a8110..e3cf758 100644 --- a/kernel/window/window.asm +++ b/kernel/window/window.asm @@ -28,6 +28,7 @@ const TITLE_BAR_HEIGHT: 16 ; outputs: ; none new_window: + push r0 push r1 push r2 push r3 @@ -140,6 +141,7 @@ new_window: pop r3 pop r2 pop r1 + pop r0 ret ; destroy a window and free memory used by it