Skip to content

Commit

Permalink
SeventhHeavenUI: Fix Steam path detection
Browse files Browse the repository at this point in the history
If the user has never installed it, the code path wrongly assumed empty path and attempts to lookup the Steam files.
Instead it should move on because the returned value should be null.
  • Loading branch information
julianxhokaxhiu committed Sep 13, 2024
1 parent 1f97459 commit 3df5dfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SeventhHeavenUI/Classes/GameConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ public static string GetInstallLocation(FF7Version installedVersion)

public static string GetSteamPath()
{
string ret = RegistryHelper.GetValue(RegistryHelper.SteamKeyPath32Bit, "SteamPath", "") as string;
string ret = RegistryHelper.GetValue(RegistryHelper.SteamKeyPath32Bit, "SteamPath") as string;

if (ret == null) ret = RegistryHelper.GetValue(RegistryHelper.SteamKeyPath64Bit, "SteamPath", "") as string;
if (ret == null) ret = RegistryHelper.GetValue(RegistryHelper.SteamKeyPath64Bit, "SteamPath") as string;

return ret.Replace("/","\\");
return ret != null ? ret.Replace("/","\\") : ret;
}

public static string GetSteamExePath()
Expand Down

0 comments on commit 3df5dfc

Please sign in to comment.