Skip to content

Commit 55a7474

Browse files
committed
Updates on MCWindowsVersionInfoParseVersion() method
1 parent 1ae162a commit 55a7474

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

engine/src/deploy_windows.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,10 +1071,10 @@ static void MCWindowsVersionInfoDestroy(MCWindowsVersionInfo *self)
10711071
delete self;
10721072
}
10731073

1074-
static uint64_t MCWindowsVersionInfoParseVersion(const char *p_string)
1074+
static uint64_t MCWindowsVersionInfoParseVersion(MCStringRef p_string)
10751075
{
10761076
uint32_t a, b, c, d;
1077-
if (sscanf(p_string, "%u.%u.%u.%u", &a, &b, &c, &d) != 4)
1077+
if (sscanf(MCStringGetCString(p_string), "%u.%u.%u.%u", &a, &b, &c, &d) != 4)
10781078
return 0;
10791079
return 0ULL | ((uint64_t)a << 48) | ((uint64_t)b << 32) | (c << 16) | d;
10801080
}
@@ -1116,15 +1116,15 @@ static bool MCWindowsResourcesAddVersionInfo(MCWindowsResources& self, MCArrayRe
11161116
if (t_success)
11171117
{
11181118
MCNewAutoNameRef t_key1, t_key2;
1119-
MCNameCreateWithCString("FileVersion", &t_key1);
1120-
MCNameCreateWithCString("ProductVersion", &t_key2);
1119+
/* UNCHECKED */ MCNameCreateWithCString("FileVersion", &t_key1);
1120+
/* UNCHECKED */ MCNameCreateWithCString("ProductVersion", &t_key2);
11211121

11221122
MCValueRef t_value1, t_value2;
11231123

11241124
if (MCArrayFetchValue(p_info, false, *t_key1, t_value1))
1125-
t_file_version = MCWindowsVersionInfoParseVersion(MCStringGetCString((MCStringRef)t_value1));
1125+
t_file_version = MCWindowsVersionInfoParseVersion((MCStringRef)t_value1);
11261126
if (MCArrayFetchValue(p_info, false, *t_key2, t_value2))
1127-
t_product_version = MCWindowsVersionInfoParseVersion(MCStringGetCString((MCStringRef)t_value2));
1127+
t_product_version = MCWindowsVersionInfoParseVersion((MCStringRef)t_value2);
11281128
MCValueRelease(t_value1);
11291129
MCValueRelease(t_value2);
11301130
}

0 commit comments

Comments
 (0)