From c049c37b8650ffe9dbb908bc02f472e1ea96d826 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 1 Apr 2015 23:42:35 +0100 Subject: [PATCH] Fix run to instruction checking instruction number vs. trace count * The trace count could be less than the number of instructions if flow control causes some instructions to be skipped (and higher if some were repeated!). There's no need to validate this value anyway, RunTo will bail when it hits the end of the trace if the number is too high. --- renderdocui/Windows/ShaderViewer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdocui/Windows/ShaderViewer.cs b/renderdocui/Windows/ShaderViewer.cs index 4a0e27296..a54b1a8f2 100644 --- a/renderdocui/Windows/ShaderViewer.cs +++ b/renderdocui/Windows/ShaderViewer.cs @@ -1391,7 +1391,7 @@ namespace renderdocui.Windows if (int.TryParse(start, out runTo)) { - if (runTo >= 0 && runTo < m_Trace.states.Length) + if (runTo >= 0) { RunTo(runTo, true); break;