summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/bytesobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index 154640e..d4f7d01 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -529,7 +529,7 @@ formatchar(char *buf, size_t buflen, PyObject *v)
"%c requires an integer in range(256) or a single byte");
goto error;
}
- buf[0] = ival;
+ buf[0] = (char)ival;
}
Py_XDECREF(w);
buf[1] = '\0';