{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/ba91df1f73d09fdf4f813a6a6b04a2ae?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"ba91df1f73d09fdf4f813a6a6b04a2ae","url":"https://api.github.com/users/xanatos","login":"xanatos","id":821344},"milestone":null,"updated_at":"2011-11-09T17:20:54Z","labels":[],"assignee":null,"comments":4,"closed_at":null,"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/616","body":"uint256.h\r\n\r\n    base_uint& operator&=(uint64 b)\r\n    {\r\n        pn[0] &= (unsigned int)b;\r\n        pn[1] &= (unsigned int)(b >> 32);\r\n        return *this;\r\n    }\r\n\r\nI think this code is conceptually wrong if connected to the operator &=. It's good enough to be put in a separate function. The problem is that it's doing the \"logical and\" only on the first two uint. The other uint should be zeroed. For example the base_uint::operator==(const base_uint& a, uint64 b) do checks the other uint of the base_uint for 0. This problem isn't present with the ^= and the |= operators because anything ^ 0 = anything, and anything | 0 = anything.\r\n","html_url":"https://github.com/bitcoin/bitcoin/issues/616","title":"base_uint::operator&=(uint64 b)","number":616,"id":2174716,"created_at":"2011-11-08T14:32:10Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/9598ae319be753b20f97f21ed10ca7ed?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"9598ae319be753b20f97f21ed10ca7ed","url":"https://api.github.com/users/laanwj","login":"laanwj","id":126646},"updated_at":"2011-11-09T17:20:54Z","url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/2683926","body":"If it is not used, wouldn't it be a good idea to we remove it? (it's in git if we need it later...)\r\n","id":2683926,"created_at":"2011-11-09T17:20:54Z"}}