From 692fb0ef31af680632c84bc18bc639cba4a0e24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 7 Jul 2020 06:12:58 +0200 Subject: hw/sd/sdcard: Make iolen unsigned MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I/O request length can not be negative. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-Id: <20200630133912.9428-15-f4bug@amsat.org> --- hw/sd/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/sd/sd.c') diff --git a/hw/sd/sd.c b/hw/sd/sd.c index aa6059d2ad..fcbc1fd9d6 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1982,7 +1982,7 @@ uint8_t sd_read_byte(SDState *sd) { /* TODO: Append CRCs */ uint8_t ret; - int io_len; + uint32_t io_len; if (!sd->blk || !blk_is_inserted(sd->blk) || !sd->enable) return 0x00; -- cgit v1.2.3