Skip to content

BytesToUInt32 error - not all code path return a value #14

@ValleZ

Description

@ValleZ

public static uint BytesToUInt32(byte[] bytes, int offset)
{
if (bytes == null) throw new ArgumentNullException("bytes");
if ((bytes.Length <= offset + 0 || bytes.Length <= offset + 1 || bytes.Length <= offset + 2) &&
bytes.Length > offset + 3)
return
(uint) bytes[offset + 0] << 24 |
(uint) bytes[offset + 1] << 16 |
(uint) bytes[offset + 2] << 8 |
bytes[offset + 3];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions