summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-15 18:20:03 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-15 18:20:03 +0000
commitde272071c57f07eb275ffe8753d88903af00f338 (patch)
tree9f160403dda60f00f94ecbf8c25483715dfea1a5 /src
parentfa94c727742dc703fae2719c11db8a5a02fa2c1d (diff)
downloadirssi-de272071c57f07eb275ffe8753d88903af00f338.zip
don't crash if trying to erase 0 chars and there's no cutbuffer.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2456 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-text/gui-entry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c
index cce8ee00..fe2bf89b 100644
--- a/src/fe-text/gui-entry.c
+++ b/src/fe-text/gui-entry.c
@@ -337,7 +337,7 @@ void gui_entry_erase(GUI_ENTRY_REC *entry, int size)
{
g_return_if_fail(entry != NULL);
- if (entry->pos < size)
+ if (entry->pos < size || size == 0)
return;
/* put erased text to cutbuffer */