Blob Blame Raw
From 27a59b0566de69a22c248ae7ba6f74bcf32ef73e Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
Date: Thu, 4 Oct 2012 11:43:14 +0100
Subject: [PATCH 6/8] offline-updates: Don't crash when writing the
 offline-update-competed file

---
 contrib/systemd-updates/pk-offline-update.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/systemd-updates/pk-offline-update.c b/contrib/systemd-updates/pk-offline-update.c
index 36972be..6d02f4a 100644
--- a/contrib/systemd-updates/pk-offline-update.c
+++ b/contrib/systemd-updates/pk-offline-update.c
@@ -280,7 +280,7 @@ pk_offline_update_write_results (PkResults *results)
 	packages = pk_results_get_package_array (results);
 	if (packages != NULL) {
 		string = g_string_new ("");
-		for (i = 0; packages->len; i++) {
+		for (i = 0; i < packages->len; i++) {
 			package = g_ptr_array_index (packages, i);
 			g_string_append_printf (string, "%s,",
 						pk_package_get_id (package));
-- 
1.7.12