aboutsummaryrefslogtreecommitdiff
path: root/primedev
diff options
context:
space:
mode:
authorJack <66967891+ASpoonPlaysGames@users.noreply.github.com>2024-03-02 14:29:02 +0000
committerGitHub <noreply@github.com>2024-03-02 15:29:02 +0100
commit026adbebe59a0a9ea1f39a8da135534a2c2ae393 (patch)
tree5faf8e4510d5f3df4f9a62229e6c0cc7e3842c30 /primedev
parentec5dc504bf91b494069b03e7903e89eff951b46c (diff)
downloadNorthstarLauncher-026adbebe59a0a9ea1f39a8da135534a2c2ae393.tar.gz
NorthstarLauncher-026adbebe59a0a9ea1f39a8da135534a2c2ae393.zip
Check OpenExternalWebBrowser custom flag better (#674)
Properly check string prefix to see if we should open it in browser
Diffstat (limited to 'primedev')
-rw-r--r--primedev/scripts/client/scriptbrowserhooks.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/primedev/scripts/client/scriptbrowserhooks.cpp b/primedev/scripts/client/scriptbrowserhooks.cpp
index 86b4a356..dcf051d2 100644
--- a/primedev/scripts/client/scriptbrowserhooks.cpp
+++ b/primedev/scripts/client/scriptbrowserhooks.cpp
@@ -9,7 +9,8 @@ void, __fastcall, (char* pUrl, char flags))
// clang-format on
{
bool bIsOriginOverlayEnabledOriginal = *bIsOriginOverlayEnabled;
- if (flags & 2 && !strncmp(pUrl, "http", 4)) // custom force external browser flag
+ bool isHttp = !strncmp(pUrl, "http://", 7) || !strncmp(pUrl, "https://", 8);
+ if (flags & 2 && isHttp) // custom force external browser flag
*bIsOriginOverlayEnabled = false; // if this bool is false, game will use an external browser rather than the origin overlay one
OpenExternalWebBrowser(pUrl, flags);