Do not snprintf() into one-byte string

This fixes a segmentation fault on startup.
Merge pull request #5 from mitya57/master

Do not snprintf() into one-byte string