From e15703b6aaae18cb0f0e80a42104bcc74cc83103 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 1 May 2021 20:21:52 +0100 Subject: [PATCH] Fix removing revision from Haiku for older versions. --- setter/src/beos/os.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/setter/src/beos/os.c b/setter/src/beos/os.c index 706b60a..6211337 100644 --- a/setter/src/beos/os.c +++ b/setter/src/beos/os.c @@ -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); }