Fixed masking/casting logic in commit log printf.