mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Fixed potential division by 0.
This commit is contained in:
parent
1c58e28124
commit
c62ac89081
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ public:
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
static inline uint32_t *nonce(uint8_t *blob) { return reinterpret_cast<uint32_t*>(blob + 39); }
|
static inline uint32_t *nonce(uint8_t *blob) { return reinterpret_cast<uint32_t*>(blob + 39); }
|
||||||
static inline uint64_t toDiff(uint64_t target) { return 0xFFFFFFFFFFFFFFFFULL / target; }
|
static inline uint64_t toDiff(uint64_t target) { return target ? (0xFFFFFFFFFFFFFFFFULL / target) : 0; }
|
||||||
|
|
||||||
inline bool operator!=(const Job &other) const { return !isEqual(other); }
|
inline bool operator!=(const Job &other) const { return !isEqual(other); }
|
||||||
inline bool operator==(const Job &other) const { return isEqual(other); }
|
inline bool operator==(const Job &other) const { return isEqual(other); }
|
||||||
|
|
Loading…
Reference in a new issue