<p></p>
<p><b>@jia200x</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/RIOT-OS/RIOT/pull/16664#discussion_r680772368">sys/net/gnrc/link_layer/lorawan/gnrc_lorawan_region.c</a>:</p>
<pre style='color:#555'>> @@ -100,7 +100,7 @@ uint32_t gnrc_lorawan_pick_channel(gnrc_lorawan_t *mac)
 {
     uint8_t index = 0;
 
-    uint8_t random_number = random_uint32_range(0, bitarithm_bits_set(mac->channel_mask));
+    uint8_t random_number = random_uint32_range(0, bitarithm_bits_set(mac->channel_mask) + 1);
</pre>
<p>ah no... I think the addition should be placed outside of the function</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/16664#discussion_r680772368">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYG73LJUT6JEZM5EXCLT2ZI2RANCNFSM5AW6NHDQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYGQF4D7MTHDXUKZVHLT2ZI2RA5CNFSM5AW6NHD2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOFLUXV3I.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16664#discussion_r680772368",
"url": "https://github.com/RIOT-OS/RIOT/pull/16664#discussion_r680772368",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>