{"action":"created","issue":{"url":"https://api.github.com/repos/savoirfairelinux/opendht/issues/48","repository_url":"https://api.github.com/repos/savoirfairelinux/opendht","labels_url":"https://api.github.com/repos/savoirfairelinux/opendht/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/savoirfairelinux/opendht/issues/48/comments","events_url":"https://api.github.com/repos/savoirfairelinux/opendht/issues/48/events","html_url":"https://github.com/savoirfairelinux/opendht/pull/48","id":138269195,"number":48,"title":"[Bug] Correction of function commonBits","user":{"login":"kaldoran","id":2991859,"avatar_url":"https://avatars.githubusercontent.com/u/2991859?v=3","gravatar_id":"","url":"https://api.github.com/users/kaldoran","html_url":"https://github.com/kaldoran","followers_url":"https://api.github.com/users/kaldoran/followers","following_url":"https://api.github.com/users/kaldoran/following{/other_user}","gists_url":"https://api.github.com/users/kaldoran/gists{/gist_id}","starred_url":"https://api.github.com/users/kaldoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaldoran/subscriptions","organizations_url":"https://api.github.com/users/kaldoran/orgs","repos_url":"https://api.github.com/users/kaldoran/repos","events_url":"https://api.github.com/users/kaldoran/events{/privacy}","received_events_url":"https://api.github.com/users/kaldoran/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-03T19:07:01Z","updated_at":"2016-03-03T19:58:06Z","closed_at":"2016-03-03T19:37:18Z","pull_request":{"url":"https://api.github.com/repos/savoirfairelinux/opendht/pulls/48","html_url":"https://github.com/savoirfairelinux/opendht/pull/48","diff_url":"https://github.com/savoirfairelinux/opendht/pull/48.diff","patch_url":"https://github.com/savoirfairelinux/opendht/pull/48.patch"},"body":"Hi,\r\n\r\nI was trying to make my cache working, and during my test i test the function commonBits.\r\nAccording to this test : http://pastebin.com/6qBXp995\r\n**Edit** : In my comment i invert the 2 size of the string.\r\n`_p.size_ = 9` and `p.size_ = 16`\r\n\r\nCommonBits should return only 9 as value ( since there is only 9 bits into _p which is a prefix of p).\r\nBut in this test it return 10.\r\n\r\nIt could be related to your bug @sim590. [ You told me about a [random ?] bug into pht]"},"comment":{"url":"https://api.github.com/repos/savoirfairelinux/opendht/issues/comments/191936610","html_url":"https://github.com/savoirfairelinux/opendht/pull/48#issuecomment-191936610","issue_url":"https://api.github.com/repos/savoirfairelinux/opendht/issues/48","id":191936610,"user":{"login":"kaldoran","id":2991859,"avatar_url":"https://avatars.githubusercontent.com/u/2991859?v=3","gravatar_id":"","url":"https://api.github.com/users/kaldoran","html_url":"https://github.com/kaldoran","followers_url":"https://api.github.com/users/kaldoran/followers","following_url":"https://api.github.com/users/kaldoran/following{/other_user}","gists_url":"https://api.github.com/users/kaldoran/gists{/gist_id}","starred_url":"https://api.github.com/users/kaldoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaldoran/subscriptions","organizations_url":"https://api.github.com/users/kaldoran/orgs","repos_url":"https://api.github.com/users/kaldoran/repos","events_url":"https://api.github.com/users/kaldoran/events{/privacy}","received_events_url":"https://api.github.com/users/kaldoran/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T19:58:06Z","updated_at":"2016-03-03T19:58:06Z","body":"So here is some update about this pull request who was merge and then undo.\r\nThe problem was in fact into my #40.\r\nBefore this modification who was merge, commonBits return a false result.\r\nAnd as far as i was base on the branch with the error, i try to correct error in commonBits which was in fact into the Prefix constructor.\r\n\r\nTo sum up : The bug was real before my #40, and was a side effect of my fix into #40.\r\n"}}