casascius / Bitcoin-Address-Utility

Generates Bitcoin addresses, converts between hex/address and public/private keys.
214 stars 161 forks source link

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

Open ValleZ opened 10 years ago

ValleZ commented 10 years ago

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]; }