Minor change in common.c (sizeof by one)

This commit is contained in:
Alberto Ortega 2015-01-01 17:49:32 +01:00
parent 591b998e9c
commit 9e0128cf73
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ void print_suspicious() {
void write_log(char msg[]) {
FILE *log;
char logstr[1024];
snprintf(logstr, sizeof(logstr), "\n[pafish] %s", msg);
snprintf(logstr, sizeof(logstr)-sizeof(logstr[0]), "\n[pafish] %s", msg);
log = fopen("pafish.log", "a");
fputs(logstr, log);
fclose(log);