diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-text/gui-entry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 27eaa540..bef76a96 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -1107,7 +1107,7 @@ void gui_entry_set_color(GUI_ENTRY_REC *entry, int pos, int len, int color) g_return_if_fail(entry != NULL); - if (pos > entry->text_len) + if (pos < 0 || len < 0 || pos > entry->text_len) return; end = pos + len; |