fix odin report macos version reporting unknown when release isn't a 3 point

This commit is contained in:
Laytan Laats
2025-02-05 20:16:17 +01:00
parent 919e9a82e7
commit b86d2c30b6

View File

@@ -532,9 +532,9 @@ gb_internal void report_os_info() {
return;
}
uint32_t major, minor, patch;
uint32_t major, minor, patch = 0;
if (sscanf(cast(const char *)sw_vers, "%u.%u.%u", &major, &minor, &patch) != 3) {
if (sscanf(cast(const char *)sw_vers, "%u.%u.%u", &major, &minor, &patch) < 1) {
gb_printf("macOS Unknown\n");
return;
}