Index: src/mdbtools/libmdb/data.c
===================================================================
--- src/mdbtools/libmdb/data.c	(revision 535579)
+++ src/mdbtools/libmdb/data.c	(working copy)
@@ -691,15 +691,20 @@
 mdb_num_to_string(MdbHandle *mdb, int start, int datatype, int prec, int scale)
 {
 	char *text;
+	int negative;
 	gint32 l;
 
 	memcpy(&l, mdb->pg_buf+start+13, 4);
-
-	text = (char *) g_malloc(prec+2);
-	sprintf(text, "%0*" G_GINT32_FORMAT, prec, GINT32_FROM_LE(l));
+	negative = (*(mdb->pg_buf+start) & 0x80) ? 1 : 0;
+	text = (char *) g_malloc(prec+2+negative);
+	if (negative) {
+		sprintf(text, "-%0*" G_GINT32_FORMAT, prec, GINT32_FROM_LE(l));
+	} else {
+		sprintf(text, "%0*" G_GINT32_FORMAT, prec, GINT32_FROM_LE(l));
+	}
 	if (scale) {
-		memmove(text+prec-scale, text+prec-scale+1, scale+1);
-		text[prec-scale] = '.';
+		memmove(text+prec-scale+1+negative, text+prec-scale+negative, scale+1);
+		text[prec-scale+negative] = '.';
 	}
 	return text;
 }
