From 7acec8800625eb752d15b6188eec5ec5e984df29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Thu, 5 Nov 2020 10:21:46 +0100 Subject: [PATCH] [python] Port: we used the wrong variable Found by clang-analyzer --- python/port/port.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/port/port.cpp b/python/port/port.cpp index c9880aed1..1964aac9c 100644 --- a/python/port/port.cpp +++ b/python/port/port.cpp @@ -177,7 +177,7 @@ void MicroPython::collectRootsAtAddress(char * address, int byteLength) { alignedByteLength += reinterpret_cast(address) & bitMaskOnes; assert(alignedAddress % ((uintptr_t)sizeof(uintptr_t)) == 0); - gc_collect_root((void **)alignedAddress, byteLength / sizeof(uintptr_t)); + gc_collect_root((void **)alignedAddress, alignedByteLength / sizeof(uintptr_t)); } KDColor MicroPython::Color::Parse(mp_obj_t input, Mode mode){