Fixes off-by-one bug from snprintf

Signed-off-by: Pasi Savanainen <pasi.savanainen@reaktor.fi>