From b43f6357d66ff67327a4d99a613440ad677643d6 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 24 Jul 2021 07:21:56 -0600 Subject: [PATCH] Opcode: Save a '&' instr by casting to U8 --- ext/Opcode/Opcode.pm | 2 +- ext/Opcode/Opcode.xs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/Opcode/Opcode.pm b/ext/Opcode/Opcode.pm index 25b66d15a6d8..937afcf1e1ec 100644 --- a/ext/Opcode/Opcode.pm +++ b/ext/Opcode/Opcode.pm @@ -6,7 +6,7 @@ use strict; our($VERSION, @ISA, @EXPORT_OK); -$VERSION = "1.52"; +$VERSION = "1.53"; use Carp; use Exporter 'import'; diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs index f574ca2cd7a2..3923386a117a 100644 --- a/ext/Opcode/Opcode.xs +++ b/ext/Opcode/Opcode.xs @@ -68,7 +68,7 @@ op_names_init(pTHX) bitmap = (U8*)SvPV(opset_all, len); memset(bitmap, 0xFF, len-1); /* deal with last byte specially, see below */ /* Take care to set the right number of bits in the last byte */ - bitmap[len-1] = (PL_maxo & 0x07) ? ((~(0xFF << (PL_maxo & 0x07))) & 0xFF) + bitmap[len-1] = (PL_maxo & 0x07) ? ((U8) (~(0xFF << (PL_maxo & 0x07)))) : 0xFF; put_op_bitspec(aTHX_ STR_WITH_LEN(":all"), opset_all); /* don't mortalise */ }