Codechange: replace strstr with more appropriate function
This commit is contained in:
@@ -383,9 +383,9 @@ void MakeNewgameSettingsLive()
|
|||||||
void OpenBrowser(const char *url)
|
void OpenBrowser(const char *url)
|
||||||
{
|
{
|
||||||
/* Make sure we only accept urls that are sure to open a browser. */
|
/* Make sure we only accept urls that are sure to open a browser. */
|
||||||
if (strstr(url, "http://") != url && strstr(url, "https://") != url) return;
|
if (StrStartsWith(url, "http://") || StrStartsWith(url, "https://")) {
|
||||||
|
|
||||||
OSOpenBrowser(url);
|
OSOpenBrowser(url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Callback structure of statements to be executed after the NewGRF scan. */
|
/** Callback structure of statements to be executed after the NewGRF scan. */
|
||||||
|
Reference in New Issue
Block a user