Skip to content

Commit b655f64

Browse files
author
xgupta
committed
address review comment
1 parent 5fe7721 commit b655f64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1298,7 +1298,7 @@ std::string GDBRemoteCommunication::ExpandRLE(std::string packet) {
12981298
std::string decoded;
12991299
decoded.reserve(packet.size());
13001300
for (std::string::const_iterator c = packet.begin(); c != packet.end();) {
1301-
if (*c == '*') {
1301+
if (*c == '*' && std::next(c) != packet.end()) {
13021302
// '*' indicates RLE. Next character will give us the repeat count and
13031303
// previous character is what is to be repeated.
13041304
char char_to_repeat = decoded.back();

0 commit comments

Comments
 (0)