1 parent 3f327cc commit 12ab9edCopy full SHA for 12ab9ed
1 file changed
py/gc.c
@@ -680,10 +680,11 @@ void gc_dump_alloc_table(void) {
680
}
681
682
// print header for new line of blocks
683
+ // (the cast to uint32_t is for 16-bit ports)
684
#if EXTENSIVE_HEAP_PROFILING
- printf("\n%05x: ", (uint)(bl * BYTES_PER_BLOCK) & 0xfffff);
685
+ printf("\n%05x: ", (uint)((bl * BYTES_PER_BLOCK) & (uint32_t)0xfffff));
686
#else
- printf("\n%05x: ", (uint)PTR_FROM_BLOCK(bl) & 0xfffff);
687
+ printf("\n%05x: ", (uint)(PTR_FROM_BLOCK(bl) & (uint32_t)0xfffff));
688
#endif
689
690
int c = ' ';
0 commit comments