1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-16 04:02:15 +00:00

Fix logic bug in cache_nvidia_string_value_update() (#2022)

* Update nvidia.cc

Made a suggested change in logic from issue #1177

* Update nvidia.cc

Made a suggested change in logic from issue #1178

* Update nvidia.cc

Made a suggested change in logic from issue #1178
This commit is contained in:
w0j0pl 2024-08-29 15:15:09 +02:00 committed by GitHub
parent c428663e02
commit 03711ea5e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -829,11 +829,12 @@ void cache_nvidia_string_value_update(nvidia_c_string *ac_string, char *token,
ac_string[gid].memTransferRatemax < 0) {
ac_string[gid].memTransferRatemax = *value;
} else if (strcmp(token, (char *)"perf") == 0 &&
ac_string[gid].memTransferRatemax < 0) {
if (search == SEARCH_MIN) {
} else if (strcmp(token, (char *)"perf") == 0) {
if (search == SEARCH_MIN &&
ac_string[gid].perfmin < 0) {
ac_string[gid].perfmin = *value;
} else if (search == SEARCH_MAX) {
} else if (search == SEARCH_MAX &&
ac_string[gid].perfmax < 0) {
ac_string[gid].perfmax = *value;
}
}