1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 18:09:09 +00:00

Codechange: replace strstr with more appropriate function

This commit is contained in:
Rubidium
2023-04-28 18:25:35 +02:00
committed by rubidium42
parent 53f83c31b0
commit 37a3fc4df3

View File

@@ -383,9 +383,9 @@ void MakeNewgameSettingsLive()
void OpenBrowser(const char *url)
{
/* Make sure we only accept urls that are sure to open a browser. */
if (strstr(url, "http://") != url && strstr(url, "https://") != url) return;
OSOpenBrowser(url);
if (StrStartsWith(url, "http://") || StrStartsWith(url, "https://")) {
OSOpenBrowser(url);
}
}
/** Callback structure of statements to be executed after the NewGRF scan. */