Commit d896232
committed
Avoid assertion failure when serialising constant integer values.
We used a loop to get the individual bytes of a constant value and
serialise them.
This would crash if we ask for 8-bits from the value, but there are
fewer than 8 bits to fetch. E.g. for a i1, you can never fetch a whole
byte's worth of bits.
This change ensures we fetch the right number of bits (i.e. fewer than 8
if there are fewer than 8 left).1 parent 7c45e9d commit d896232
1 file changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
773 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
774 | 789 | | |
| 790 | + | |
775 | 791 | | |
776 | 792 | | |
777 | 793 | | |
| |||
0 commit comments