From 00d54fa11a44322094997b3817511145723fe646 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 30 Nov 2021 16:44:52 +0100 Subject: [PATCH] - fixed return value of updatesector pointer variant. --- source/build/include/build.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/build/include/build.h b/source/build/include/build.h index 336e74551..b44fe99cc 100644 --- a/source/build/include/build.h +++ b/source/build/include/build.h @@ -445,7 +445,7 @@ inline void updatesector(int const x, int const y, sectortype** const sectp) { int sectno = *sectp? (*sectp) - sector : -1; updatesector(x, y, §no); - *sectp = §or[sectno]; + *sectp = sectno == -1? nullptr : §or[sectno]; } void updatesectorz(int32_t const x, int32_t const y, int32_t const z, int * const sectnum) ATTRIBUTE((nonnull(4)));