Skip to content

Commit

Permalink
riscv: Fixes UndefinedBehaviorSanitizer issue
Browse files Browse the repository at this point in the history
  • Loading branch information
erhankur authored and gerekon committed May 31, 2021
1 parent 224860b commit fd26738
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/target/riscv/riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ int riscv_hit_watchpoint(struct target *target, struct watchpoint **hit_watchpoi

for (int i = 0; i < length; i++) {
LOG_DEBUG("Next byte is %x", buffer[i]);
instruction += (buffer[i] << 8 * i);
instruction += ((uint32_t)buffer[i] << 8 * i);
}
LOG_DEBUG("Full instruction is %x", instruction);

Expand Down

0 comments on commit fd26738

Please sign in to comment.