mirror of
https://github.com/RPCS3/discord-bot.git
synced 2024-12-13 05:35:58 +00:00
fix nvidia driver version formatting in some cases
This commit is contained in:
parent
4819e795f4
commit
587dd1fc6c
@ -402,6 +402,8 @@ namespace CompatBot.Utils.ResultFormatters
|
||||
|
||||
if (result.EndsWith(".0.0"))
|
||||
result = result.Substring(0, result.Length - 4);
|
||||
if (result.Length > 3 && result[result.Length - 2] == '.')
|
||||
result = result.Substring(0, result.Length - 1) + "0" + result[result.Length - 1];
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -435,7 +437,7 @@ namespace CompatBot.Utils.ResultFormatters
|
||||
{
|
||||
if (patch == 0)
|
||||
return $"{major}.{minor}";
|
||||
return $"{major}.{minor}.{(patch >> 6) & 0xff}.{patch & 0x3f}";
|
||||
return $"{major}.{minor:00}.{(patch >> 6) & 0xff}.{patch & 0x3f}";
|
||||
}
|
||||
|
||||
return $"{major}.{minor}.{patch}";
|
||||
|
Loading…
Reference in New Issue
Block a user