[gnome-builder] snippet: check lower/upper bounds before iterating array
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] snippet: check lower/upper bounds before iterating array
- Date: Sat, 3 Oct 2015 23:19:41 +0000 (UTC)
commit 465af106ebff5ec27cfa9ed2a579d4c3a297320a
Author: Christian Hergert <christian hergert me>
Date: Sat Oct 3 16:19:33 2015 -0700
snippet: check lower/upper bounds before iterating array
libide/ide-source-snippet.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-snippet.c b/libide/ide-source-snippet.c
index df62da0..b14b26d 100644
--- a/libide/ide-source-snippet.c
+++ b/libide/ide-source-snippet.c
@@ -751,6 +751,9 @@ ide_source_snippet_before_delete_range (IdeSourceSnippet *self,
break;
}
+ if (lower_bound == -1 || upper_bound == -1)
+ return;
+
for (i = lower_bound; i <= upper_bound; i++)
{
chunk = g_ptr_array_index (self->chunks, i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]