From 46c856eeeddae74405b24752cbd624ffab0ad4df Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 27 Jan 2015 23:47:45 +0000 Subject: [PATCH] 6502: correct typecasts for the break limit --- Kernel/cpu-6502/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/cpu-6502/cpu.h b/Kernel/cpu-6502/cpu.h index 87102327..c8610660 100644 --- a/Kernel/cpu-6502/cpu.h +++ b/Kernel/cpu-6502/cpu.h @@ -30,7 +30,7 @@ extern size_t __fastcall__ strlen(const char *); /* High byte is saved, low byte is a mystery so take worst case. Also allow a bit less as C stack is not return stack */ -#define brk_limit() ((udata.u_syscall_sp | 0xFF) - 384) +#define brk_limit() ((((uint16_t)udata.u_syscall_sp) | 0xFF) - 384) #define staticfast static -- 2.34.1