From 4d13709c0054509b5c84fc810af9aa277acf5be1 Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 7 Jun 2020 14:10:31 +0200 Subject: [PATCH] Check the module information struct version --- source/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/main.cpp b/source/main.cpp index 4d20b4f..3fe64ab 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -23,6 +23,12 @@ std::vector loadPlugins(const std::vector &pluginLi module_information_t *gModuleData = NULL; WUMS_INITIALIZE(args) { gModuleData = args.module_information; + if(gModuleData == NULL){ + OSFatal("WUPS-Backend: Failed to get gModuleData pointer."); + } + if(gModuleData->version != MODULE_INFORMATION_VERSION){ + OSFatal("WUPS-Backend: The module information struct version does not match."); + } } WUMS_APPLICATION_STARTS() {