mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 08:00:25 +01:00
nouveau/parser: Fix an integer overflow and a typo
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
a4b29aaa72
commit
76e30e64da
1 changed files with 2 additions and 2 deletions
|
|
@ -170,7 +170,7 @@ for mthd in mthddict:
|
|||
print("\tcase " + nvcl + "_" + mthd + ":")
|
||||
print("\t\treturn \"" + nvcl + "_" + mthd + "\";")
|
||||
print("\tdefault:")
|
||||
print("\t\treturn \"unkown method\";")
|
||||
print("\t\treturn \"unknown method\";")
|
||||
print("\t};")
|
||||
print("}")
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ for mthd in mthddict:
|
|||
if (field_width == 32):
|
||||
print("\t\tparsed = data;")
|
||||
else:
|
||||
print("\t\tparsed = (data >> " + mthddict[mthd].field_name_start[field_name] + ") & ((1 << " + str(field_width) + ") - 1);")
|
||||
print("\t\tparsed = (data >> " + mthddict[mthd].field_name_start[field_name] + ") & ((1u << " + str(field_width) + ") - 1);")
|
||||
print("\t\tprintf(\"%s." + field_name + " = \", prefix);")
|
||||
if len(mthddict[mthd].field_defs[field_name]):
|
||||
print("\t\tswitch (parsed) {")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue