arm: reset IT block before cs_disasm(). this fixes issue #643

This commit is contained in:
Nguyen Anh Quynh 2016-04-27 14:43:10 +08:00
parent bc2d971d68
commit efb1c5a096

3
cs.c
View File

@ -466,6 +466,9 @@ size_t CAPSTONE_API cs_disasm(csh ud, const uint8_t *buffer, size_t size, uint64
handle->errnum = CS_ERR_OK;
// reset IT block of ARM structure
handle->ITBlock.size = 0;
#ifdef CAPSTONE_USE_SYS_DYN_MEM
if (count > 0 && count <= INSN_CACHE_SIZE)
cache_size = (unsigned int) count;