Fix removing revision from Haiku for older versions.

This commit is contained in:
2021-05-01 20:21:52 +01:00
parent 5a839e6e58
commit e15703b6aa

View File

@@ -68,8 +68,13 @@ void GetOsInfo()
else if(strncmp(buf.sysname, "Haiku", 5) == 0)
{
strncpy(version, buf.version, _SYS_NAMELEN);
version_date = strchr(version, '+');
*version_date = '\0';
version_date = strchr(version, '+');
if(version_date) *version_date = '\0';
else
{
version_date = strchr(version, ' ');
if(version_date) *version_date = '\0';
}
log_write("Running under Haiku %s\n", buf.version);
}