diff --git a/xtrn/lord2/l2lib.js b/xtrn/lord2/l2lib.js
index 423f53c275e33e095e04151f32b4da960a2f3b3d..d5c4409332ca27504be5ba4cbcf4532e362baac0 100644
--- a/xtrn/lord2/l2lib.js
+++ b/xtrn/lord2/l2lib.js
@@ -1064,7 +1064,7 @@ function space_pad(str, len)
 
 function pretty_int(int, rpad)
 {
-	var ret = parseInt(int, 10).toString();
+	var ret = parseInt(Math.abs(int), 10).toString();
 	var i;
 	if (rpad === undefined)
 		rpad = 0;
@@ -1072,6 +1072,8 @@ function pretty_int(int, rpad)
 	for (i = ret.length - 3; i > 0; i-= 3) {
 		ret = ret.substr(0, i)+','+ret.substr(i);
 	}
+	if (int < 0)
+		ret = '-' + ret;
 	ret = space_pad(ret, rpad);
 	return ret;
 }