mirror of
https://github.com/python/cpython
synced 2026-09-29 08:25:30 +03:00
Properly use &&. Closes bug #434988.
This commit is contained in:
parent
b28f6e7c7b
commit
bfdf4ecad0
1 changed files with 2 additions and 2 deletions
|
|
@ -189,8 +189,8 @@ PyCurses_ConvertToChtype(PyObject *obj, chtype *ch)
|
|||
{
|
||||
if (PyInt_Check(obj)) {
|
||||
*ch = (chtype) PyInt_AsLong(obj);
|
||||
} else if(PyString_Check(obj) &
|
||||
(PyString_Size(obj) == 1)) {
|
||||
} else if(PyString_Check(obj)
|
||||
&& (PyString_Size(obj) == 1)) {
|
||||
*ch = (chtype) *PyString_AsString(obj);
|
||||
} else {
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue