From 94543467822401b407f4b061268e42d59d6a905b Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Wed, 1 Jan 2020 08:19:48 +0100 Subject: ENGINES: Copy the data referenced by QualifiedGameDescriptor The engineId, gameId and description come from static data in the game engines. When the game engines are compiled as dynamic plugins, the QGD structure may outlive the engine plugin. Making a copy ensures the data remains available. Fixes #11292. --- engines/game.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'engines/game.h') diff --git a/engines/game.h b/engines/game.h index e378976cb1..8316857e24 100644 --- a/engines/game.h +++ b/engines/game.h @@ -66,10 +66,12 @@ public: /** * The description of a game supported by an engine */ -struct QualifiedGameDescriptor : public PlainGameDescriptor { - const char *engineId; +struct QualifiedGameDescriptor { + Common::String engineId; + Common::String gameId; + Common::String description; - QualifiedGameDescriptor(); + QualifiedGameDescriptor() {} QualifiedGameDescriptor(const char *engine, const PlainGameDescriptor &pgd); }; -- cgit v1.2.3