diff options
| author | Alan Modra <amodra@gmail.com> | 2026-03-08 22:44:23 +1030 |
|---|---|---|
| committer | Alan Modra <amodra@gmail.com> | 2026-03-09 08:33:51 +1030 |
| commit | 5cd25036ae9e52fa04ecf08585906783798d2d44 (patch) | |
| tree | 65e360eac4c2a4b0bbe8d66625e58e8d36076d9e /opcodes | |
| parent | 741c7868cb0123684eafd6de74fda8f1588ac846 (diff) | |
| download | fsf-binutils-gdb-5cd25036ae9e52fa04ecf08585906783798d2d44.tar.gz fsf-binutils-gdb-5cd25036ae9e52fa04ecf08585906783798d2d44.tar.bz2 fsf-binutils-gdb-5cd25036ae9e52fa04ecf08585906783798d2d44.zip | |
z80: use signed char for relative offset
A char is signed on some hosts, unsigned on others.
* z80-dis.c (prt_e): Don't use plain char for offset.
Diffstat (limited to 'opcodes')
| -rw-r--r-- | opcodes/z80-dis.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/opcodes/z80-dis.c b/opcodes/z80-dis.c index 0c0c19092a2..d5b4c4210d0 100644 --- a/opcodes/z80-dis.c +++ b/opcodes/z80-dis.c @@ -111,13 +111,10 @@ prt (struct buffer *buf, disassemble_info * info, const char *txt) static int prt_e (struct buffer *buf, disassemble_info * info, const char *txt) { - char e; - int target_addr; - if (fetch_data (buf, info, 1)) { - e = buf->data[1]; - target_addr = (buf->base + 2 + e) & 0xffff; + signed char e = buf->data[1]; + int target_addr = (buf->base + 2 + e) & 0xffff; buf->n_used = buf->n_fetch; info->fprintf_func (info->stream, "%s0x%04x", txt, target_addr); } |
