- address GCC error in d_anonstats.cpp

This commit is contained in:
Rachael Alexanderson 2023-09-20 23:58:30 -04:00
parent ffcfec66b3
commit 00e0a9fd76

View file

@ -71,6 +71,12 @@ FString URLencode(const char *s)
return out; return out;
} }
// accept FString inputs too
FString URLencode(FString s)
{
return URLencode(s.GetChars());
}
#ifdef _WIN32 #ifdef _WIN32
bool I_HTTPRequest(const char* request) bool I_HTTPRequest(const char* request)
@ -285,8 +291,8 @@ void D_DoAnonStats()
static char requeststring[1024]; static char requeststring[1024];
mysnprintf(requeststring, sizeof requeststring, "GET /stats_202309.py?render=%i&cores=%i&os=%i&glversion=%i&vendor=%s&model=%s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\nUser-Agent: %s %s\r\n\r\n", mysnprintf(requeststring, sizeof requeststring, "GET /stats_202309.py?render=%i&cores=%i&os=%s&glversion=%i&vendor=%s&model=%s HTTP/1.1\r\nHost: %s\r\nConnection: close\r\nUser-Agent: %s %s\r\n\r\n",
GetRenderInfo(), GetCoreInfo(), GetOSVersion(), GetGLVersion(), URLencode(screen->vendorstring).GetChars(), URLencode(screen->DeviceName()).GetChars(), *anonstats_host, GAMENAME, VERSIONSTR); GetRenderInfo(), GetCoreInfo(), URLencode(GetOSVersion()).GetChars(), GetGLVersion(), URLencode(screen->vendorstring).GetChars(), URLencode(screen->DeviceName()).GetChars(), *anonstats_host, GAMENAME, VERSIONSTR);
DPrintf(DMSG_NOTIFY, "Sending %s", requeststring); DPrintf(DMSG_NOTIFY, "Sending %s", requeststring);
#if 1//ndef _DEBUG #if 1//ndef _DEBUG
// Don't send info in debug builds // Don't send info in debug builds