mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-14 06:40:48 +00:00
Better parameter searching; remove parameter value instead of overriding it with X
This commit is contained in:
parent
4c2b5b38a0
commit
5751ea5727
41
cheevos.c
41
cheevos.c
@ -309,28 +309,53 @@ static void cheevos_log_url(const char* format, const char* url)
|
||||
#else
|
||||
char copy[256];
|
||||
char* aux;
|
||||
char* next;
|
||||
|
||||
strncpy(copy, url, sizeof(copy));
|
||||
copy[sizeof(copy) - 1] = 0;
|
||||
|
||||
aux = strstr(copy, "p=");
|
||||
aux = strstr(copy, "?p=");
|
||||
|
||||
if (aux == NULL)
|
||||
aux = strstr(copy, "&p=");
|
||||
|
||||
if (aux != NULL)
|
||||
{
|
||||
aux += 2;
|
||||
aux += 3;
|
||||
next = strchr(aux, '&');
|
||||
|
||||
while (*aux != 0 && *aux != '&')
|
||||
*aux++ = 'X';
|
||||
if (next != NULL)
|
||||
{
|
||||
do
|
||||
{
|
||||
*aux++ = *next++;
|
||||
}
|
||||
while (next[-1] != 0);
|
||||
}
|
||||
else
|
||||
*aux = 0;
|
||||
}
|
||||
|
||||
aux = strstr(copy, "t=");
|
||||
aux = strstr(copy, "?t=");
|
||||
|
||||
if (aux == NULL)
|
||||
aux = strstr(copy, "&t=");
|
||||
|
||||
if (aux != NULL)
|
||||
{
|
||||
aux += 2;
|
||||
aux += 3;
|
||||
next = strchr(aux, '&');
|
||||
|
||||
while (*aux != 0 && *aux != '&')
|
||||
*aux++ = 'X';
|
||||
if (next != NULL)
|
||||
{
|
||||
do
|
||||
{
|
||||
*aux++ = *next++;
|
||||
}
|
||||
while (next[-1] != 0);
|
||||
}
|
||||
else
|
||||
*aux = 0;
|
||||
}
|
||||
|
||||
RARCH_LOG(format, copy);
|
||||
|
Loading…
x
Reference in New Issue
Block a user