mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 10:10:09 +01:00
mesa: Fix NULL deref in optimizer when NumInstructions == 0.
Bug #24984.
This commit is contained in:
parent
48deddaa6f
commit
c4e8918cd2
1 changed files with 1 additions and 1 deletions
|
|
@ -443,7 +443,7 @@ _mesa_remove_extra_move_use(struct gl_program *prog)
|
|||
* FOO tmpY, arg0, arg1;
|
||||
*/
|
||||
|
||||
for (i = 0; i < prog->NumInstructions - 1; i++) {
|
||||
for (i = 0; i + 1 < prog->NumInstructions; i++) {
|
||||
const struct prog_instruction *mov = prog->Instructions + i;
|
||||
|
||||
if (mov->Opcode != OPCODE_MOV ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue