Fix snprintf() usage
Merge pull request #619 from lpefferkorn/fix_snprintf

Snprintf() improvments