1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-02-04 11:04:26 +00:00

MMQ ensure delta clock can never exceed limits

This commit is contained in:
Kano 2012-12-19 14:30:48 +11:00
parent d848289e8c
commit f0003055a4

View File

@ -623,10 +623,10 @@ static const char *modminer_delta_clock(struct thr_info *thr, int delta, bool te
state->hw_errors = 0;
// FYI clock drop has little effect on temp
if (delta < 0 && modminer->clock <= MODMINER_MIN_CLOCK)
if (delta < 0 && (modminer->clock + delta) < MODMINER_MIN_CLOCK)
return clocktoolow;
if (delta > 0 && modminer->clock >= MODMINER_MAX_CLOCK)
if (delta > 0 && (modminer->clock + delta) > MODMINER_MAX_CLOCK)
return clocktoohi;
if (delta < 0) {