From 30aa716ba6e5d638cf153dfb6fb036fa218a645e Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Fri, 17 Oct 2008 19:21:23 +0000 Subject: [PATCH] "Copy Spare / Some colors" is no longer a guaranteed SEGFAULT (crash) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@279 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- boutons.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/boutons.c b/boutons.c index b5599854..537db015 100644 --- a/boutons.c +++ b/boutons.c @@ -1129,17 +1129,19 @@ void Copier_image_seule(void) void Copier_certaines_couleurs(void) { short Indice; + byte Confirme=0; - Menu_Tag_couleurs("Tag colors to copy",Masque_copie_couleurs,NULL,0, NULL); + Menu_Tag_couleurs("Tag colors to copy",Masque_copie_couleurs,&Confirme,0, NULL); - if ( (!Brouillon_Image_modifiee) - || (Demande_de_confirmation("Spare page was modified. Proceed?")) ) + if (Confirme) + { for (Indice=0; Indice<256; Indice++) { if (Masque_copie_couleurs[Indice]) memcpy(Brouillon_Palette+Indice,Principal_Palette+Indice, sizeof(struct Composantes)); } + } }