summaryrefslogtreecommitdiffstats
path: root/devices/cpu_cpu.go
diff options
context:
space:
mode:
authorxxxserxxx <60757196+xxxserxxx@users.noreply.github.com>2020-03-03 22:43:28 -0600
committerGitHub <noreply@github.com>2020-03-03 22:43:28 -0600
commit164e2b6167f7ebf1ae786f66b8715959086df81d (patch)
treee041243ece1acc59f8cbad442c5e76391a16489e /devices/cpu_cpu.go
parent8bd1108311a51517c8ee425550ecdb1a917de9c3 (diff)
parentf4e8677f74a51d1ce80cae34492d4aaa06892deb (diff)
Merge branch 'master' into patch-1
Diffstat (limited to 'devices/cpu_cpu.go')
-rw-r--r--devices/cpu_cpu.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/devices/cpu_cpu.go b/devices/cpu_cpu.go
index a1d20cd..42eff2e 100644
--- a/devices/cpu_cpu.go
+++ b/devices/cpu_cpu.go
@@ -23,7 +23,11 @@ func init() {
}
for i := 0; i < len(vals); i++ {
key := fmt.Sprintf(formatString, i)
- cpus[key] = int(vals[i])
+ v := vals[i]
+ if v > 100 {
+ v = 100
+ }
+ cpus[key] = int(v)
}
return nil
}