X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FOpcode%2FOpcode.xs;h=538f0ecf30ecedca63ad90732cd2d83f643c796a;hb=8903cb82b09fb34870c757f52ce481b09be4b606;hp=ef2be80594ef999e366eccf0b0ec686a7cf55206;hpb=b306bf39bf31f44f4dcbcdf8bc1d3be82f5e6da3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Opcode/Opcode.xs b/ext/Opcode/Opcode.xs index ef2be80..538f0ec 100644 --- a/ext/Opcode/Opcode.xs +++ b/ext/Opcode/Opcode.xs @@ -46,7 +46,7 @@ op_names_init() while(i-- > 0) bitmap[i] = 0xFF; /* Take care to set the right number of bits in the last byte */ - bitmap[len-1] = ~(0xFF << (maxo & 0x07)); + bitmap[len-1] = (maxo & 0x07) ? ~(0xFF << (maxo & 0x07)) : 0xFF; put_op_bitspec(":all",0, opset_all); /* don't mortalise */ } @@ -290,7 +290,8 @@ invert_opset(opset) while(len-- > 0) bitmap[len] = ~bitmap[len]; /* take care of extra bits beyond maxo in last byte */ - bitmap[opset_len-1] &= ~(0xFF << (maxo & 0x07)); + if (maxo & 07) + bitmap[opset_len-1] &= ~(0xFF << (maxo & 0x07)); } ST(0) = opset;