aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx1
-rw-r--r--src/Editor.h2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 2331e64e0..ce606ee00 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -5487,7 +5487,6 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
if (selectedText.len) {
for (; iChar < selectedText.len; iChar++)
ptr[iChar] = selectedText.s[iChar];
- ptr[iChar] = '\0';
} else {
ptr[0] = '\0';
}
diff --git a/src/Editor.h b/src/Editor.h
index 6eccb50bd..08c56f7a4 100644
--- a/src/Editor.h
+++ b/src/Editor.h
@@ -126,6 +126,8 @@ public:
};
/**
+ * Hold a piece of text selected for copying or dragging.
+ * The text is expected to hold a terminating '\0'.
*/
class SelectionText {
public: