cast all the values to write to registers in uc_reg_write() to unsigned type. this fixes issue #98

This commit is contained in:
Nguyen Anh Quynh
2015-09-04 11:17:08 +08:00
parent 2cdadf1720
commit 84e3b5c897
7 changed files with 133 additions and 133 deletions

View File

@@ -56,7 +56,7 @@ int sparc_reg_write(struct uc_struct *uc, unsigned int regid, const void *value)
CPUState *mycpu = first_cpu;
if (regid >= UC_SPARC_REG_G0 && regid <= UC_SPARC_REG_G7)
SPARC_CPU(uc, mycpu)->env.gregs[regid - UC_SPARC_REG_G0] = *(int32_t *)value;
SPARC_CPU(uc, mycpu)->env.gregs[regid - UC_SPARC_REG_G0] = *(uint32_t *)value;
else {
switch(regid) {
default: break;