From 67c94b2f02967ae80cd6e8213aea4c5402997edf Mon Sep 17 00:00:00 2001 From: "elias.bachaalany" Date: Tue, 17 Aug 2010 12:31:36 +0000 Subject: [PATCH] idaapi.dbg_get_registers() was crashing with registers that had a custom format --- swig/idd.i | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/swig/idd.i b/swig/idd.i index 85d3187..a258d93 100644 --- a/swig/idd.i +++ b/swig/idd.i @@ -214,7 +214,8 @@ static PyObject *dbg_get_registers() PyObject *py_bits; // Does this register have bit strings? - if ( ri.bit_strings != NULL ) + // (Make sure it does not use custom formats because bit_string would be the format name) + if ( ri.bit_strings != NULL && (ri.flags & REGISTER_CUSTFMT) == 0 ) { int nbits = (int)b2a_width((int)get_dtyp_size(ri.dtyp), 0) * 4; py_bits = PyList_New(nbits);