From de272071c57f07eb275ffe8753d88903af00f338 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 15 Feb 2002 18:20:03 +0000 Subject: [PATCH] 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 --- src/fe-text/gui-entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */