From 716b98c25a2717862c528b630c18655b247e1e68 Mon Sep 17 00:00:00 2001 From: Artur Rojek Date: Fri, 16 Dec 2022 07:48:01 +0100 Subject: [PATCH] Fix hires cockpit image display (#271) (#272) Strip map height is a 16 bit value. Cast to `br_uint_16 *`, so that the upper 8 bits don't get lost. This fixes cockpit image rendering for -hires mode, where said images have heights exceeding 255px. --- src/DETHRACE/common/loading.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DETHRACE/common/loading.c b/src/DETHRACE/common/loading.c index 9391f05f..02099f0b 100644 --- a/src/DETHRACE/common/loading.c +++ b/src/DETHRACE/common/loading.c @@ -842,7 +842,7 @@ tS8* ConvertPixToStripMap(br_pixelmap* pThe_br_map) { temp_strip_image = BrMemAllocate(pThe_br_map->row_bytes * pThe_br_map->height, kMem_strip_image); current_size = 2; - *temp_strip_image = pThe_br_map->height; + *(br_uint_16 *)temp_strip_image = pThe_br_map->height; current_strip_pointer = temp_strip_image; for (i = 0; i < pThe_br_map->height; i++) {