www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - bit[] < bit[] fails for fields longer than 8 elements

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

int main(){
	bit[9] a;
	a[8] = false;
	bit[9] b;
	b[8] = true;
	
	assert(a<b);
	
	return 0;
}

Added to DStress as
http://dstress.kuehne.cn/run/opCmp_07_A.d
http://dstress.kuehne.cn/run/opCmp_07_B.d

FIX:

internal/adi.d -> _adCmpBit (line 776)
from
	for (uint j = i * 8; j < len; j++)
to
	for (uint j = 0; i*8 + j < len; j++)

Thomas
-----BEGIN PGP SIGNATURE-----

iD8DBQFDOTD23w+/yD4P9tIRAihnAKCGq9GxvfLwI+HWVxy/aiuRoAEQ4ACfTS0E
HN/JQ4Rlvdf7J4Qtl+mBJXY=
=QpML
-----END PGP SIGNATURE-----
Sep 27 2005