summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 264470b..aa0d0df 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1482,7 +1482,7 @@ builtin_ord(PyObject *self, PyObject* obj)
/* XXX Hopefully this is temporary */
size = PyBytes_GET_SIZE(obj);
if (size == 1) {
- ord = (long)*PyBytes_AS_STRING(obj);
+ ord = (long)((unsigned char)*PyBytes_AS_STRING(obj));
return PyInt_FromLong(ord);
}
}