diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 11d1169f0..7ceea2ff1 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |||
| @@ -426,9 +426,14 @@ private: | |||
| 426 | std::string Visit(Node node) { | 426 | std::string Visit(Node node) { |
| 427 | if (const auto operation = std::get_if<OperationNode>(node)) { | 427 | if (const auto operation = std::get_if<OperationNode>(node)) { |
| 428 | const auto operation_index = static_cast<std::size_t>(operation->GetCode()); | 428 | const auto operation_index = static_cast<std::size_t>(operation->GetCode()); |
| 429 | if (operation_index >= operation_decompilers.size()) { | ||
| 430 | UNREACHABLE_MSG("Out of bounds operation: {}", operation_index); | ||
| 431 | return {}; | ||
| 432 | } | ||
| 429 | const auto decompiler = operation_decompilers[operation_index]; | 433 | const auto decompiler = operation_decompilers[operation_index]; |
| 430 | if (decompiler == nullptr) { | 434 | if (decompiler == nullptr) { |
| 431 | UNREACHABLE_MSG("Operation decompiler {} not defined", operation_index); | 435 | UNREACHABLE_MSG("Undefined operation: {}", operation_index); |
| 436 | return {}; | ||
| 432 | } | 437 | } |
| 433 | return (this->*decompiler)(*operation); | 438 | return (this->*decompiler)(*operation); |
| 434 | 439 | ||