From 61bedbdd55bcd8ede1b1488cba5cd4bd76e3d77b Mon Sep 17 00:00:00 2001 From: sidney Date: Thu, 26 Dec 2024 22:55:52 +0100 Subject: [PATCH] Added explicit cast to uint8_t, to make the Cisual Studio compiler happy. --- src/sim65/peripherals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sim65/peripherals.c b/src/sim65/peripherals.c index 516a827b0..d48cf7137 100644 --- a/src/sim65/peripherals.c +++ b/src/sim65/peripherals.c @@ -137,7 +137,7 @@ uint8_t PeripheralsReadByte (uint8_t Addr) default: Value = 0; /* Reading from a non-existent latch register will yield 0. */ } /* Return the desired byte of the latched counter. 0==LSB, 7==MSB. */ - return Value >> (ByteIndex * 8); + return (uint8_t)(Value >> (ByteIndex * 8)); } /* Handle reads from unused peripheral and write-only addresses. */