File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1254,7 +1254,7 @@ static REBCNT EncodedU32_Size(u32 value) {
1254
1254
if (cmd == SYM_SB ) {
1255
1255
SET_INTEGER (temp , u );
1256
1256
} else {
1257
- SET_DECIMAL (temp , (double )u / 65536.0 );
1257
+ SET_DECIMAL (temp , (( double )(( i64 ) u ) / 65536.0 ) );
1258
1258
}
1259
1259
break ;
1260
1260
case SYM_BIT :
Original file line number Diff line number Diff line change @@ -247,6 +247,9 @@ is-protected-error?: func[code][
247
247
--assert [-2 6 ] = binary/read 2#{ 1110 0110 } [SB 4 SB 4 ]
248
248
--assert 14 = binary/read/with 2#{ 1110 0000 } 'UB 4
249
249
--assert [2.5 ] = binary/read #{ 500000 } [FB 19 ]
250
+ binary/read 2#{ 11111000 11111000 } [x: SB 6 ALIGN y: FB 6 ]
251
+ --assert -2 = x
252
+ --assert -2.0 = (y * 65536.0 )
250
253
251
254
--test-- "BinCode - bits (variant using sigle value access)"
252
255
bin: binary #{ 438E9438 }
You can’t perform that action at this time.
0 commit comments