log.c: Fixed overflow