Fix #11469: Clear memory but dont increment buffer position (#11472)

Fix a regression from #11412 that did:

set_format_arg(0, rct_string_id, ...)
set_format_arg(4, uint32_t, 0)

ride->FormatNameTo(gCommonFormatArgs + 2)

Notice it continues from byte 2, and not 8.
So the `set_format_arg(4, uint32_t... )` was just
for clearing memory, not for adding a new argument
This commit is contained in:
Breno Rodrigues Guimarães 2020-04-26 10:48:35 -03:00 committed by GitHub
parent a3e7f0958c
commit 305b4d4957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -165,9 +165,11 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
if (!is_exit && !(tile_element->IsGhost()) && tile_element->AsEntrance()->GetRideIndex() != RIDE_ID_NULL
&& stationObj->ScrollingMode != SCROLLING_MODE_NONE)
{
// clear next 8 bytes
Formatter::Common().Add<uint32_t>(0).Add<uint32_t>(0);
auto ft = Formatter::Common();
ft.Add<rct_string_id>(STR_RIDE_ENTRANCE_NAME);
ft.Add<uint32_t>(0);
if (ride->status == RIDE_STATUS_OPEN && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN))
{