gas: avoid GCC 10 warning stringop-overflow in tc-bpf.c
[deliverable/binutils-gdb.git] / gas / config / tc-bpf.c
index aa48108748b197aac177875a89d0cd467895111b..026a631280deddbed87876e47790bbf0a91917ca 100644 (file)
@@ -324,8 +324,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
 
              Note that the CALL instruction has only one operand, so
              this code is executed only once per instruction.  */
-          where = fixP->fx_frag->fr_literal + fixP->fx_where;
-          where[1] = target_big_endian ? 0x01 : 0x10;
+          where = fixP->fx_frag->fr_literal + fixP->fx_where + 1;
+          where[0] = target_big_endian ? 0x01 : 0x10;
           /* Fallthrough.  */
         case BPF_OPERAND_DISP16:
           /* The PC-relative displacement fields in jump instructions
This page took 0.02263 seconds and 4 git commands to generate.