mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-12 02:40:41 -04:00
fix odin report macos version reporting unknown when release isn't a 3 point
This commit is contained in:
1 parent
919e9a82e7
commit
b86d2c30b6
1 file changed
+2
-2
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user