From 64752ab52c61f053c0690cf36c712f4662bccfb1 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 11 Jul 2015 16:22:47 +1000 Subject: Small bug fix + doco --- src/gos/gos_raw32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gos/gos_raw32.c b/src/gos/gos_raw32.c index caacab20..c454a68b 100644 --- a/src/gos/gos_raw32.c +++ b/src/gos/gos_raw32.c @@ -685,7 +685,7 @@ gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_ nf = (char *)(t) + sizeof(thread) + stackbase; memcpy(t+1, (char *)&t - stackbase, stackbase+sizeof(char *)); } else { // Stack grows down - nf = (char *)(t) + stacksz - (stackbase + sizeof(char *)); + nf = (char *)(t) + t->size - (stackbase + sizeof(char *)); memcpy(nf, &t, stackbase+sizeof(char *)); } #elif STACK_DIR_UP -- cgit v1.2.3