Fix off by one error

We increment i twice - which causes us to access memory past the end of
the allocated array.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2012-12-07 20:01:05 -08:00
parent 407d4dd4aa
commit 0fcdd011f5

View file

@ -1592,7 +1592,6 @@ static int fill_computer_list(GtkListStore *vendorstore, GtkListStore ***product
dcl = dcl->next;
}
/* now add the empty product list in case no vendor is selected */
i++;
pstores[i] = gtk_list_store_new(1, G_TYPE_POINTER);
if (*product_index == -1)
*product_index = i;