Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/os.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const {
Float64Array,
NumberParseInt,
ObjectDefineProperties,
StringPrototypeIncludes,
StringPrototypeSlice,
SymbolToPrimitive,
} = primordials;
Expand Down Expand Up @@ -244,7 +245,7 @@ function getCIDR(address, netmask, family) {
const binaryOnes = countBinaryOnes(binary);
ones += binaryOnes;
if (binaryOnes !== groupLength) {
if ((binary & 1) !== 0) {
if (StringPrototypeIncludes(binary.toString(2), '01')) {
return null;
}
hasZeros = true;
Expand Down
Loading