sibradzic / upp

A tool for parsing, dumping and modifying data in Radeon PowerPlay tables
GNU General Public License v3.0
154 stars 24 forks source link

Small oops in decode.py get_value() #6

Closed thomab closed 4 years ago

thomab commented 4 years ago

The bug causes an inaccurate error message to be printed.

For example:

$ upp get smcPPTable/SocketPowerLimitDc/3
0
$ upp get smcPPTable/SocketPowerLimitDc/4
ERROR: Invalid parameter "4", avaliable ones are: 0, 1, 2  # <-- should be 0, 1, 2, 3

On line 277 in decode.py: indices = [str(i) for i in range(len(data)-1)]

should instead be: indices = [str(i) for i in range(len(data))]

Regards.

Btw, thanks for putting this program together, great for tuning my navi blower card!

sibradzic commented 4 years ago

thanks for reporting @thomab !