From 5f7a852e5776140a5521ae97831fadf8b4c817cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 20 May 2022 22:39:30 +0200 Subject: [PATCH] Fix possible crash when reporting scenery name in S4 import Similar to https://github.com/OpenRCT2/OpenRCT2/pull/17197 --- src/openrct2/rct1/S4Importer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 8c3ba56a58..4cc85eba06 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -718,7 +718,8 @@ namespace RCT1 if (_sceneryGroupEntries.GetCount() >= MAX_SCENERY_GROUP_OBJECTS) { Console::WriteLine("Warning: More than %d (max scenery groups) in RCT1 park.", MAX_SCENERY_GROUP_OBJECTS); - Console::WriteLine(" [%s] scenery group not added.", entryName); + std::string entryNameString = std::string(entryName); + Console::WriteLine(" [%s] scenery group not added.", entryNameString.c_str()); } else {