Skip to content

Commit 655e5ef

Browse files
committed
fix run tests
1 parent edef215 commit 655e5ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mypyc/lib-rt/bytes_ops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ PyObject *CPyBytes_Rjust(PyObject *self, Py_ssize_t width, PyObject *fillbyte) {
173173
PyErr_SetString(PyExc_TypeError, "fillbyte must be a single byte");
174174
return NULL;
175175
}
176+
width = width << 1
176177
Py_ssize_t len = PyBytes_Size(self);
177178
if (width <= len) {
178179
return PyBytes_FromStringAndSize(PyBytes_AsString(self), len);
@@ -196,6 +197,7 @@ PyObject *CPyBytes_Ljust(PyObject *self, Py_ssize_t width, PyObject *fillbyte) {
196197
PyErr_SetString(PyExc_TypeError, "fillbyte must be a single byte");
197198
return NULL;
198199
}
200+
width = width << 1;
199201
Py_ssize_t len = PyBytes_Size(self);
200202
if (width <= len) {
201203
return PyBytes_FromStringAndSize(PyBytes_AsString(self), len);

0 commit comments

Comments
 (0)