Commit 0e18e68
buffer: fix writeInt{B,L}E for some neg values
The algorithm used to convert negative values to hex generates incorrect
values when the low byte(s) of the value are zero because a carried
subtraction is applied prematurely.
Fixes: #3992
PR-URL: #3994
Reviewed-By: Trevor Norris <[email protected]>
Signed-off-by: Peter A. Bigot <[email protected]>1 parent 4302648 commit 0e18e68
2 files changed
+40
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
939 | 939 | | |
940 | 940 | | |
941 | 941 | | |
942 | | - | |
| 942 | + | |
943 | 943 | | |
944 | | - | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
945 | 947 | | |
| 948 | + | |
946 | 949 | | |
947 | 950 | | |
948 | 951 | | |
| |||
962 | 965 | | |
963 | 966 | | |
964 | 967 | | |
965 | | - | |
| 968 | + | |
966 | 969 | | |
967 | | - | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
968 | 973 | | |
| 974 | + | |
969 | 975 | | |
970 | 976 | | |
971 | 977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1027 | 1027 | | |
1028 | 1028 | | |
1029 | 1029 | | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
1030 | 1050 | | |
1031 | 1051 | | |
1032 | 1052 | | |
| |||
1056 | 1076 | | |
1057 | 1077 | | |
1058 | 1078 | | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1059 | 1089 | | |
1060 | 1090 | | |
1061 | 1091 | | |
| |||
0 commit comments