Fix null terminator bug.

Signed-off-by: Sean Qureshi <sean@tox.im>