[libgee/0.6] PriorityQueue: Fix underflow while updating degree, fixes bug #647162
- From: Maciej Marcin Piechotka <mpiechotka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgee/0.6] PriorityQueue: Fix underflow while updating degree, fixes bug #647162
- Date: Thu, 29 Sep 2011 11:04:04 +0000 (UTC)
commit 1f44a3011e67381f8332e9fe37981a1945bbeadc
Author: Hisao Suzuki <suzuki611 oki com>
Date: Thu Sep 29 13:01:17 2011 +0200
PriorityQueue: Fix underflow while updating degree, fixes bug #647162
gee/priorityqueue.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gee/priorityqueue.vala b/gee/priorityqueue.vala
index 6a6f8bf..e1c6796 100644
--- a/gee/priorityqueue.vala
+++ b/gee/priorityqueue.vala
@@ -663,7 +663,7 @@ public class Gee.PriorityQueue<G> : Gee.AbstractQueue<G> {
_a[degree] = null;
int i = _a.length - 1;
- while (_a[i] == null) {
+ while (a >= 0 && _a[i] == null) {
i--;
}
_a.resize (i + 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]