summaryrefslogtreecommitdiff
path: root/formatter/generic/genericformatter.cpp
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2025-07-21 12:20:08 -0400
committerAlexander Taylor <alex@vector35.com>2025-07-21 14:03:54 -0400
commitc9f1802f8f5a1b2b0b1d7f40a4140becb61bd193 (patch)
treea8e931bc203c3a718eaaa27d284798bcb061d176 /formatter/generic/genericformatter.cpp
parent1335512648312125662303787867960394429749 (diff)
Fix read one past the end of token list in the line formatter
Diffstat (limited to 'formatter/generic/genericformatter.cpp')
-rw-r--r--formatter/generic/genericformatter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/formatter/generic/genericformatter.cpp b/formatter/generic/genericformatter.cpp
index 063acecf..e73a630a 100644
--- a/formatter/generic/genericformatter.cpp
+++ b/formatter/generic/genericformatter.cpp
@@ -967,7 +967,7 @@ vector<DisassemblyTextLine> GenericLineFormatter::FormatLines(
{
case BraceToken:
// Beginning of string
- if (trimmedText == "\"" && tokenIndex + 1 <= currentLine.tokens.size() && currentLine.tokens[tokenIndex + 1].type == StringToken)
+ if (trimmedText == "\"" && tokenIndex + 1 < currentLine.tokens.size() && currentLine.tokens[tokenIndex + 1].type == StringToken)
{
// Create a ContainerContents item and place it onto the item stack. This will hold anything
// inside the container once the end of the container is found.