Fix negative integer parsing

Signed-off-by: Pekka Enberg <penberg@iki.fi>