Skip to content

Commit 6956360

Browse files
committed
FIX: correct fix of regression when creating 64 bit vectors
resolves: Oldes/Rebol-issues#2590
1 parent 238ecbc commit 6956360

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/core/t-vector.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ void Set_Vector_Row(REBSER *ser, REBVAL *blk)
446446
ser->tail = len; // !!! another way to do it?
447447

448448
// Store info about the vector (could be moved to flags if necessary):
449-
ser->size = (dims << 8) | (type << 3) | (sign << 2) | (bits >> 4)-1; // bits are zero based value!
449+
ser->size = (dims << 8) | (type << 3) | (sign << 2) | (bits == 64 ? 3 : bits >> 4); // there are only 2 bits to store the info
450450

451451
return ser;
452452
}

src/tests/units/vector-test.r3

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Rebol [
6767
--assert [1 2] = to block! #[u16! [1 2]]
6868

6969
--test-- "to-binary vector!"
70+
;@@ https://github.com/Oldes/Rebol-issues/issues/2590
7071
--assert #{01000200} = to binary! #[u16! [1 2]]
7172
--assert #{0100000002000000} = to binary! #[i32! [1 2]]
7273
--assert #{0000803F00000040} = to binary! #[f32! [1 2]]

0 commit comments

Comments
 (0)