diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-03 21:01:53 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-04-03 21:02:09 +0200 |
commit | 06c1f75f21d04ebd8ed291a74136f9c8f043664f (patch) | |
tree | 1093374df00eb7f982cb9ce097c88c47e9e799d5 /src/video_core | |
parent | Merge pull request #2294 from lioncash/fatal (diff) | |
download | yuzu-06c1f75f21d04ebd8ed291a74136f9c8f043664f.tar yuzu-06c1f75f21d04ebd8ed291a74136f9c8f043664f.tar.gz yuzu-06c1f75f21d04ebd8ed291a74136f9c8f043664f.tar.bz2 yuzu-06c1f75f21d04ebd8ed291a74136f9c8f043664f.tar.lz yuzu-06c1f75f21d04ebd8ed291a74136f9c8f043664f.tar.xz yuzu-06c1f75f21d04ebd8ed291a74136f9c8f043664f.tar.zst yuzu-06c1f75f21d04ebd8ed291a74136f9c8f043664f.zip |
Diffstat (limited to 'src/video_core')
-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: std::string Visit(Node node) { if (const auto operation = std::get_if<OperationNode>(node)) { const auto operation_index = static_cast<std::size_t>(operation->GetCode()); + if (operation_index >= operation_decompilers.size()) { + UNREACHABLE_MSG("Out of bounds operation: {}", operation_index); + return {}; + } const auto decompiler = operation_decompilers[operation_index]; if (decompiler == nullptr) { - UNREACHABLE_MSG("Operation decompiler {} not defined", operation_index); + UNREACHABLE_MSG("Undefined operation: {}", operation_index); + return {}; } return (this->*decompiler)(*operation); |