Skip to content
Prev Previous commit
Next Next commit
Insert missing braces
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
  • Loading branch information
lordmauve and picnixz committed Mar 12, 2025
commit ef92b4eee117c15a55115370753750ac4ecc3a00
3 changes: 2 additions & 1 deletion Objects/bytesobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -2539,8 +2539,9 @@ _PyBytes_FromHex(PyObject *string, int use_bytearray)
str = PyUnicode_1BYTE_DATA(string);
}
else if (PyObject_CheckBuffer(string)) {
if (PyObject_GetBuffer(string, &view, PyBUF_SIMPLE) != 0)
if (PyObject_GetBuffer(string, &view, PyBUF_SIMPLE) != 0) {
return NULL;
}
hexlen = view.len;
str = view.buf;
}
Expand Down