1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

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
This commit is contained in:
Timo Sirainen 2002-02-15 18:20:03 +00:00 committed by cras
parent fa94c72774
commit de272071c5

View File

@ -337,7 +337,7 @@ void gui_entry_erase(GUI_ENTRY_REC *entry, int size)
{ {
g_return_if_fail(entry != NULL); g_return_if_fail(entry != NULL);
if (entry->pos < size) if (entry->pos < size || size == 0)
return; return;
/* put erased text to cutbuffer */ /* put erased text to cutbuffer */