mercurial/base85.c
changeset 16848 19a915d43a68
parent 16837 1b9d54c00d50
child 26074 c1aefe57cf4e
--- a/mercurial/base85.c	Mon Jun 04 19:05:22 2012 +0200
+++ b/mercurial/base85.c	Mon Jun 04 16:59:34 2012 +0200
@@ -111,7 +111,8 @@
 			if (c < 0)
 				return PyErr_Format(
 					PyExc_ValueError,
-					"bad base85 character at position %d", i);
+					"bad base85 character at position %d",
+					(int)i);
 			acc = acc * 85 + c;
 		}
 		if (i++ < len)
@@ -120,13 +121,15 @@
 			if (c < 0)
 				return PyErr_Format(
 					PyExc_ValueError,
-					"bad base85 character at position %d", i);
+					"bad base85 character at position %d",
+					(int)i);
 			/* overflow detection: 0xffffffff == "|NsC0",
 			 * "|NsC" == 0x03030303 */
 			if (acc > 0x03030303 || (acc *= 85) > 0xffffffff - c)
 				return PyErr_Format(
 					PyExc_ValueError,
-					"bad base85 sequence at position %d", i);
+					"bad base85 sequence at position %d",
+					(int)i);
 			acc += c;
 		}