summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/misc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/misc.cpp b/src/misc.cpp
index 0c9caf06c..17401cc15 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -375,7 +375,7 @@ bool LineWrapper::GetLine(Anope::string &out)
}
}
- auto color = text.substr(start, start - idx);
+ auto color = text.substr(start, idx - start + 1);
toggle_formatting(color);
out.append(color);
break;
@@ -392,7 +392,7 @@ bool LineWrapper::GetLine(Anope::string &out)
break;
}
- auto color = text.substr(start, start - idx);
+ auto color = text.substr(start, idx - start + 1);
toggle_formatting(color);
out.append(color);
}