diff --git a/source/fuzz/fuzzer_pass_add_loads.cpp b/source/fuzz/fuzzer_pass_add_loads.cpp index 16d88e3b4..256255bcd 100644 --- a/source/fuzz/fuzzer_pass_add_loads.cpp +++ b/source/fuzz/fuzzer_pass_add_loads.cpp @@ -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; diff --git a/source/fuzz/fuzzer_pass_add_stores.cpp b/source/fuzz/fuzzer_pass_add_stores.cpp index ff660505c..46efc6431 100644 --- a/source/fuzz/fuzzer_pass_add_stores.cpp +++ b/source/fuzz/fuzzer_pass_add_stores.cpp @@ -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;