Fix function use (#3372)

This PR fixes a function use of a Instruction object.
This commit is contained in:
André Perez 2020-05-26 08:28:02 -03:00 committed by GitHub
parent 9cb2571a18
commit 55af3902fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ void FuzzerPassAddLoads::Apply() {
if (!instruction->result_id() || !instruction->type_id()) {
return false;
}
switch (instruction->result_id()) {
switch (instruction->opcode()) {
case SpvOpConstantNull:
case SpvOpUndef:
// Do not allow loading from a null or undefined pointer;

View File

@ -72,7 +72,7 @@ void FuzzerPassAddStores::Apply() {
// Read only: cannot store to it.
return false;
}
switch (instruction->result_id()) {
switch (instruction->opcode()) {
case SpvOpConstantNull:
case SpvOpUndef:
// Do not allow storing to a null or undefined pointer;