# HG changeset patch # User nadvornik # Date 1208640008 0 # Node ID 96f8389c36dea5a352fe7d55f36a10d534127df0 # Parent d7272434b8c2c4d5146e578821a41686a51bcf0d fixed max. number of profiles diff -r d7272434b8c2 -r 96f8389c36de src/image.c --- a/src/image.c Sat Apr 19 21:18:24 2008 +0000 +++ b/src/image.c Sat Apr 19 21:20:08 2008 +0000 @@ -1709,7 +1709,7 @@ { if (!imd) return; - if (input_type < 0 || input_type > COLOR_PROFILE_INPUTS || + if (input_type < 0 || input_type >= COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS || screen_type < 0 || screen_type > 1) { return; diff -r d7272434b8c2 -r 96f8389c36de src/layout.c --- a/src/layout.c Sat Apr 19 21:18:24 2008 +0000 +++ b/src/layout.c Sat Apr 19 21:20:08 2008 +0000 @@ -337,7 +337,7 @@ if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) return; type = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), COLOR_MENU_KEY)); - if (type < 0 || type > COLOR_PROFILE_INPUTS) return; + if (type < 0 || type >= COLOR_PROFILE_FILE + COLOR_PROFILE_INPUTS) return; if (!layout_image_color_profile_get(lw, &input, &screen, &use_image)) return; if (type == input) return;