From 58d28b4e4d0aac6c3a0a702d60d68476f644ecd5 Mon Sep 17 00:00:00 2001 From: Halo-Michael <45062120+Halo-Michael@users.noreply.github.com> Date: Sun, 14 Aug 2022 02:42:05 +0800 Subject: [PATCH] Assign value to version where appropriate --- ios/main.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios/main.mm b/ios/main.mm index 4e00cb2d3d..b10db1a79c 100644 --- a/ios/main.mm +++ b/ios/main.mm @@ -98,7 +98,7 @@ static bool g_jitAvailable = false; static int g_iosVersionMinor; */ static int g_iosVersionMajor; -static std::string version = [[[UIDevice currentDevice] systemVersion] UTF8String]; +static std::string version; std::string System_GetProperty(SystemProperty prop) { switch (prop) { @@ -259,6 +259,7 @@ int main(int argc, char *argv[]) // So, we'll just resort to a version check. + version = [[[UIDevice currentDevice] systemVersion] UTF8String]; if (2 != sscanf(version.c_str(), "%d", &g_iosVersionMajor)) { // Just set it to 14.0 if the parsing fails for whatever reason. g_iosVersionMajor = 14;