Skip to content

Commit

Permalink
Explicitly cast buffers to char*
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Nov 18, 2013
1 parent 8b89f50 commit 7acb273
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lexer.c
Expand Up @@ -605,9 +605,9 @@ void Lexer::scan(Token *t)
::time(&ct);
char *p = ctime(&ct);
assert(p);
sprintf(date, "%.6s %.4s", p + 4, p + 20);
sprintf(time, "%.8s", p + 11);
sprintf(timestamp, "%.24s", p);
sprintf(&date[0], "%.6s %.4s", p + 4, p + 20);
sprintf(&time[0], "%.8s", p + 11);
sprintf(&timestamp[0], "%.24s", p);
}

if (id == Id::DATE)
Expand Down

0 comments on commit 7acb273

Please sign in to comment.