Avoid copying unneeded bytes

This commit is contained in:
Alcaro 2016-11-26 20:27:13 +01:00
parent 8b29fb4293
commit 77b1421500
2 changed files with 2 additions and 8 deletions

View File

@ -461,13 +461,6 @@ static void cheevos_log_cond(const cheevos_cond_t* cond)
static void cheevos_log_cheevo(const cheevo_t* cheevo,
const cheevos_field_t* memaddr_ud)
{
char memaddr[256];
strlcpy(memaddr, memaddr_ud->string, sizeof(memaddr));
if (memaddr_ud->length < sizeof(memaddr))
memaddr[memaddr_ud->length] = 0;
RARCH_LOG("CHEEVOS cheevo %p\n", cheevo);
RARCH_LOG("CHEEVOS id: %u\n", cheevo->id);
RARCH_LOG("CHEEVOS title: %s\n", cheevo->title);
@ -476,7 +469,7 @@ static void cheevos_log_cheevo(const cheevo_t* cheevo,
RARCH_LOG("CHEEVOS badge: %s\n", cheevo->badge);
RARCH_LOG("CHEEVOS points: %u\n", cheevo->points);
RARCH_LOG("CHEEVOS sets: TBD\n");
RARCH_LOG("CHEEVOS memaddr: %s\n", memaddr);
RARCH_LOG("CHEEVOS memaddr: %s\n", memaddr_ud->string);
}
static void cheevos_add_var_size(char** aux, size_t* left,

View File

@ -168,6 +168,7 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
}
break;
default:
sprintf(s, "Windows %i.%i", *major, *minor);
break;
}
}