mirror of
https://github.com/cemu-project/idapython.git
synced 2024-11-28 03:54:18 +01:00
qfile_t._from_fp was broken
This commit is contained in:
parent
06e8cad773
commit
8b7625f145
@ -21,7 +21,7 @@ private:
|
|||||||
return false;
|
return false;
|
||||||
own = false;
|
own = false;
|
||||||
fn.sprnt("<FILE * %p>", fp);
|
fn.sprnt("<FILE * %p>", fp);
|
||||||
fp = fp;
|
this->fp = fp;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
inline void _from_cobject(PyObject *pycobject)
|
inline void _from_cobject(PyObject *pycobject)
|
||||||
@ -198,9 +198,9 @@ public:
|
|||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
int write(PyObject *py_buf)
|
int write(PyObject *py_buf)
|
||||||
{
|
{
|
||||||
size_t sz = PyString_GET_SIZE(py_buf);
|
if (!PyString_Check(py_buf))
|
||||||
void *buf = (void *)PyString_AS_STRING(py_buf);
|
return 0;
|
||||||
return qfwrite(fp, buf, sz);
|
return qfwrite(fp, (void *)PyString_AS_STRING(py_buf), PyString_GET_SIZE(py_buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user