From 85ab4c9c9a2b74928354efda722ed35fe679b9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MrSm=C3=B6r?= <66489839+MrSmoer@users.noreply.github.com> Date: Wed, 5 Nov 2025 04:20:50 +0100 Subject: [PATCH] Fix: avr_flash_t's tmppage was cleared to 0x00ff -> 0xffff in avr_flash_clear_temppage avr_flash_t's tmppage is of type uint16_t* and in avr_flash_clear_temppage it is reset to 0xff, which results to a pattern of 0x00ff00ff00ff in the tmppage. This is supposed to be reset to 0xffff :) --- simavr/sim/avr_flash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simavr/sim/avr_flash.c b/simavr/sim/avr_flash.c index e6d18f39..0d67787e 100644 --- a/simavr/sim/avr_flash.c +++ b/simavr/sim/avr_flash.c @@ -59,7 +59,7 @@ avr_flash_clear_temppage( avr_flash_t *p) { for (int i = 0; i < p->spm_pagesize / 2; i++) { - p->tmppage[i] = 0xff; + p->tmppage[i] = 0xffff; p->tmppage_used[i] = 0; } }