Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package siril for openSUSE:Factory checked 
in at 2022-11-09 12:57:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/siril (Old)
 and      /work/SRC/openSUSE:Factory/.siril.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "siril"

Wed Nov  9 12:57:12 2022 rev:17 rq:1034535 version:1.0.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/siril/siril.changes      2022-09-29 
18:12:54.059201784 +0200
+++ /work/SRC/openSUSE:Factory/.siril.new.1597/siril.changes    2022-11-09 
12:57:42.884442392 +0100
@@ -1,0 +2,23 @@
+Tue Oct 18 09:25:14 UTC 2022 - Paolo Stivanin <[email protected]>
+
+- Update to 1.0.6:
+  * When an empty or malformed SER file was in the directory,
+    previewing it would crash siril.
+  * Saving an image as TIFF could crash siril.
+  * Extracting the polynomial background gradient could crash
+    siril when not enough samples were set.
+  * The iif command of Pixel Math had a problem.
+    Also, PixelMath mishandled some negative values.
+  * Cropping a sequence with images of different sizes
+    would crash if the selected area was not common to all
+    the frames of the sequence.
+  * Command seqstat could crash on large sequences when some
+    images were not selected.
+  * Siril could crash when a large star was close to border
+    during star detection.
+  * Asinh tool had bad behaviour with the black point for
+    monochrome and 32bits images.
+  * Searching for a sky object in SIMBAD containing a ???+??? character
+    in its named failed.
+
+-------------------------------------------------------------------

Old:
----
  siril-1.0.5.tar.bz2

New:
----
  siril-1.0.6.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ siril.spec ++++++
--- /var/tmp/diff_new_pack.ptYSbz/_old  2022-11-09 12:57:43.332444918 +0100
+++ /var/tmp/diff_new_pack.ptYSbz/_new  2022-11-09 12:57:43.332444918 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           siril
-Version:        1.0.5
+Version:        1.0.6
 Release:        0
 Summary:        An astronomical image processing software for Linux. (IRIS 
clone)
 License:        BSL-1.0 AND GPL-3.0-or-later

++++++ siril-1.0.5.tar.bz2 -> siril-1.0.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/ChangeLog new/siril-1.0.6/ChangeLog
--- old/siril-1.0.5/ChangeLog   2022-09-08 10:55:15.000000000 +0200
+++ new/siril-1.0.6/ChangeLog   2022-10-17 11:23:39.000000000 +0200
@@ -1,5 +1,20 @@
+siril 1.0.6
+10/18/22
+
+* Fixed crash on opening a malformed SER
+* Fixed crash in savetif
+* Fixed crash in polynomial background extraction when not enough sample were 
set
+* Fixed bug in iif where no parameters could be used
+* Fixed crash in seqstat when some images were deselected
+* Fixed crash in star detection when large star was close to border
+* Fixed bad behaviour of asinh blackpoint with monochrome/32bits images
+* Fixed bug in PixelMath with negate values
+* Fixed bug in SIMBAD request when object name contains '+'
+* Fixed bug in rotational gradient
+
 siril 1.0.5
 09/09/22
+
 * Fixed bug in eyedropper feature with 16bits images
 * Added button to see original image in background extraction
 * Fixed bug introduced in 1.0.4 with one pixel shift when registering meridian 
flipped images
@@ -7,6 +22,7 @@
 
 siril 1.0.4
 09/02/22
+
 * Fixed selected area for flat autonormalisation calc
 * Fixed wrong initialization in polynomial background extraction
 * Fixed cold pixels rejection in GESDT stacking
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/NEWS new/siril-1.0.6/NEWS
--- old/siril-1.0.5/NEWS        2022-09-08 10:55:15.000000000 +0200
+++ new/siril-1.0.6/NEWS        2022-10-17 11:23:39.000000000 +0200
@@ -1,4 +1,18 @@
-v1.0.5 October 09, 2022
+v1.0.6 xx xx, 2022
+
+* Fixed crash on opening a malformed SER
+* Fixed crash in savetif
+* Fixed crash in polynomial background extraction when not enough sample were 
set
+* Fixed bug in iif where no parameters could be used
+* Fixed crash in seqstat when some images were deselected
+* Fixed crash in star detection when large star was close to border
+* Fixed bad behaviour of asinh blackpoint with monochrome/32bits images
+* Fixed bug in PixelMath with negate values
+* Fixed bug in SIMBAD request when object name contains '+'
+* Fixed bug in rotational gradient
+
+v1.0.5 September 09, 2022
+
 * Fixed bug in eyedropper feature with 16bits images
 * Added button to see original image in background extraction
 * Fixed bug introduced in 1.0.4 with one pixel shift when registering meridian 
flipped images
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/configure.ac new/siril-1.0.6/configure.ac
--- old/siril-1.0.5/configure.ac        2022-09-08 10:55:15.000000000 +0200
+++ new/siril-1.0.6/configure.ac        2022-10-17 11:23:39.000000000 +0200
@@ -1,7 +1,7 @@
 dnl Process this file with autoconf to produce a configure script.
 m4_define([siril_major_version], [1])
 m4_define([siril_minor_version], [0])
-m4_define([siril_micro_version], [5])
+m4_define([siril_micro_version], [6])
 m4_define([siril_prerelease_version], [rc3])
 m4_define([siril_version],
           [siril_major_version.siril_minor_version.siril_micro_version])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/meson.build new/siril-1.0.6/meson.build
--- old/siril-1.0.5/meson.build 2022-09-08 10:55:15.000000000 +0200
+++ new/siril-1.0.6/meson.build 2022-10-17 11:23:39.000000000 +0200
@@ -27,7 +27,7 @@
 
 project('siril',
   ['c','cpp'],
-  version : '1.0.5',
+  version : '1.0.6',
   license : ['GPL3'],
   meson_version: '>=0.56.0',
   default_options : [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/siril-1.0.5/platform-specific/linux/org.free_astro.siril.appdata.xml 
new/siril-1.0.6/platform-specific/linux/org.free_astro.siril.appdata.xml
--- old/siril-1.0.5/platform-specific/linux/org.free_astro.siril.appdata.xml    
2022-09-08 10:55:15.000000000 +0200
+++ new/siril-1.0.6/platform-specific/linux/org.free_astro.siril.appdata.xml    
2022-10-17 11:23:39.000000000 +0200
@@ -90,6 +90,14 @@
   <update_contact>cyril_at_free-astro.org</update_contact>
   <content_rating type="oars-1.0"/>
   <releases>
+      <release version="1.0.6" type="stable" date="2022-10-18">
+      <url type="details">https://www.siril.org/download/1.0.6</url>
+      <description>
+        <p>
+          Siril 1.0.6 is a bug fix release only.
+        </p>
+      </description>
+    </release>
       <release version="1.0.5" type="stable" date="2022-09-09">
       <url type="details">https://www.siril.org/download/1.0.5</url>
       <description>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/algos/astrometry_solver.c 
new/siril-1.0.6/src/algos/astrometry_solver.c
--- old/siril-1.0.5/src/algos/astrometry_solver.c       2022-09-08 
10:55:15.000000000 +0200
+++ new/siril-1.0.6/src/algos/astrometry_solver.c       2022-10-17 
11:23:39.000000000 +0200
@@ -1937,12 +1937,16 @@
        remove_spaces_from_str(name);
 
        if (!is_fallback){
-               string_url = g_string_new(CDSSESAME);
-               string_url = g_string_append(string_url, "/-oI/A?");
-               string_url = g_string_append(string_url, name);
+               string_url = g_string_new(name);
+               g_string_replace(string_url, "+", "%2B", 0);
+               g_string_replace(string_url, "-", "%2D", 0);
+               string_url = g_string_prepend(string_url, "/-oI/A?");
+               string_url = g_string_prepend(string_url, CDSSESAME);
        } else {
-               string_url = g_string_new(SIMBADSESAME);
-               string_url = g_string_append(string_url, name);
+               string_url = g_string_new(name);
+               g_string_replace(string_url, "+", "%2B", 0);
+               g_string_replace(string_url, "-", "%2D", 0);
+               string_url = g_string_prepend(string_url, SIMBADSESAME);
                string_url = g_string_append(string_url, "';");
        }
        url = g_string_free(string_url, FALSE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/algos/background_extraction.c 
new/siril-1.0.6/src/algos/background_extraction.c
--- old/siril-1.0.5/src/algos/background_extraction.c   2022-09-08 
10:55:15.000000000 +0200
+++ new/siril-1.0.6/src/algos/background_extraction.c   2022-10-17 
11:23:39.000000000 +0200
@@ -872,6 +872,7 @@
                gtk_widget_set_sensitive(lookup_widget("bkg_show_original"), 
TRUE);
                free(args);
        }
+       set_cursor_waiting(FALSE);
        return FALSE;
 }
 
@@ -914,9 +915,7 @@
                if (!interpolation_worked) {
                        free(image);
                        free(background);
-                       queue_message_dialog(GTK_MESSAGE_ERROR, _("Not enough 
samples."),
-                                       error);
-                       set_cursor_waiting(FALSE);
+                       queue_message_dialog(GTK_MESSAGE_ERROR, _("Not enough 
samples."),       error);
                        free(args);
                        siril_add_idle(end_background, NULL);
                        return NULL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/algos/geometry.c 
new/siril-1.0.6/src/algos/geometry.c
--- old/siril-1.0.5/src/algos/geometry.c        2022-09-08 10:55:15.000000000 
+0200
+++ new/siril-1.0.6/src/algos/geometry.c        2022-10-17 11:23:39.000000000 
+0200
@@ -390,33 +390,41 @@
  * data is correctly written to this new area, which makes this function
  * quite dangerous to use when fit is used for something else afterwards.
  */
-static void crop_ushort(fits *fit, rectangle *bounds) {
+static int crop_ushort(fits *fit, rectangle *bounds) {
        int i, j, layer;
        int newnbdata;
        struct timeval t_start = { 0 }, t_end = { 0 };
+       rectangle bounds_cpy = { 0 };
+
+       if (bounds->x >= fit->rx) return -1;
+       if (bounds->y >= fit->ry) return -1;
+       bounds_cpy.x = bounds->x;
+       bounds_cpy.y = bounds->y;
+       bounds_cpy.w = (bounds->x + bounds->w > fit->rx) ? fit->rx - bounds->x 
: bounds->w;
+       bounds_cpy.h = (bounds->y + bounds->h > fit->ry) ? fit->ry - bounds->y 
: bounds->h;
 
        if (fit == &gfit) {
                siril_log_color_message(_("Crop: processing...\n"), "red");
                gettimeofday(&t_start, NULL);
        }
 
-       newnbdata = bounds->w * bounds->h;
+       newnbdata = bounds_cpy.w * bounds_cpy.h;
        for (layer = 0; layer < fit->naxes[2]; ++layer) {
                WORD *from = fit->pdata[layer]
-                               + (fit->ry - bounds->y - bounds->h) * fit->rx + 
bounds->x;
+                               + (fit->ry - bounds_cpy.y - bounds_cpy.h) * 
fit->rx + bounds_cpy.x;
                fit->pdata[layer] = fit->data + layer * newnbdata;
                WORD *to = fit->pdata[layer];
-               int stridefrom = fit->rx - bounds->w;
+               int stridefrom = fit->rx - bounds_cpy.w;
 
-               for (i = 0; i < bounds->h; ++i) {
-                       for (j = 0; j < bounds->w; ++j) {
+               for (i = 0; i < bounds_cpy.h; ++i) {
+                       for (j = 0; j < bounds_cpy.w; ++j) {
                                *to++ = *from++;
                        }
                        from += stridefrom;
                }
        }
-       fit->rx = fit->naxes[0] = bounds->w;
-       fit->ry = fit->naxes[1] = bounds->h;
+       fit->rx = fit->naxes[0] = bounds_cpy.w;
+       fit->ry = fit->naxes[1] = bounds_cpy.h;
 
        if (fit == &gfit) {
                clear_stars_list();
@@ -424,35 +432,44 @@
                show_time(t_start, t_end);
        }
        invalidate_stats_from_fit(fit);
+       return 0;
 }
 
-static void crop_float(fits *fit, rectangle *bounds) {
+static int crop_float(fits *fit, rectangle *bounds) {
        int i, j, layer;
        int newnbdata;
        struct timeval t_start = { 0 }, t_end = { 0 };
+       rectangle bounds_cpy = { 0 };
+
+       if (bounds->x >= fit->rx) return -1;
+       if (bounds->y >= fit->ry) return -1;
+       bounds_cpy.x = bounds->x;
+       bounds_cpy.y = bounds->y;
+       bounds_cpy.w = (bounds->x + bounds->w > fit->rx) ? fit->rx - bounds->x 
: bounds->w;
+       bounds_cpy.h = (bounds->y + bounds->h > fit->ry) ? fit->ry - bounds->y 
: bounds->h;
 
        if (fit == &gfit) {
                siril_log_color_message(_("Crop: processing...\n"), "green");
                gettimeofday(&t_start, NULL);
        }
 
-       newnbdata = bounds->w * bounds->h;
+       newnbdata = bounds_cpy.w * bounds_cpy.h;
        for (layer = 0; layer < fit->naxes[2]; ++layer) {
                float *from = fit->fpdata[layer]
-                               + (fit->ry - bounds->y - bounds->h) * fit->rx + 
bounds->x;
+                               + (fit->ry - bounds_cpy.y - bounds_cpy.h) * 
fit->rx + bounds_cpy.x;
                fit->fpdata[layer] = fit->fdata + layer * newnbdata;
                float *to = fit->fpdata[layer];
-               int stridefrom = fit->rx - bounds->w;
+               int stridefrom = fit->rx - bounds_cpy.w;
 
-               for (i = 0; i < bounds->h; ++i) {
-                       for (j = 0; j < bounds->w; ++j) {
+               for (i = 0; i < bounds_cpy.h; ++i) {
+                       for (j = 0; j < bounds_cpy.w; ++j) {
                                *to++ = *from++;
                        }
                        from += stridefrom;
                }
        }
-       fit->rx = fit->naxes[0] = bounds->w;
-       fit->ry = fit->naxes[1] = bounds->h;
+       fit->rx = fit->naxes[0] = bounds_cpy.w;
+       fit->ry = fit->naxes[1] = bounds_cpy.h;
 
        if (fit == &gfit) {
                clear_stars_list();
@@ -460,6 +477,7 @@
                show_time(t_start, t_end);
        }
        invalidate_stats_from_fit(fit);
+       return 0;
 }
 
 int crop(fits *fit, rectangle *bounds) {
@@ -467,9 +485,13 @@
        shift.x = (double)(bounds->x);
        shift.y = fit->ry - (double)(bounds->h) - (double)(bounds->y) - 1; // 
for top-bottom flip
        if (fit->type == DATA_USHORT) {
-               crop_ushort(fit, bounds);
+               if (crop_ushort(fit, bounds)) {
+                       return -1;
+               }
        } else if (fit->type == DATA_FLOAT) {
-               crop_float(fit, bounds);
+               if (crop_float(fit, bounds)) {
+                       return -1;
+               }
        } else {
                return -1;
        }
@@ -637,6 +659,7 @@
        args->load_new_sequence = TRUE;
        args->user = crop_sequence_data;
 
+       remove_prefixed_sequence_files(crop_sequence_data->seq, 
crop_sequence_data->prefix);
        start_in_new_thread(generic_sequence_worker, args);
 
        return 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/algos/star_finder.c 
new/siril-1.0.6/src/algos/star_finder.c
--- old/siril-1.0.5/src/algos/star_finder.c     2022-09-08 10:55:15.000000000 
+0200
+++ new/siril-1.0.6/src/algos/star_finder.c     2022-10-17 11:23:39.000000000 
+0200
@@ -409,7 +409,7 @@
 
                                // Computing zero-upcrossing of the 2nd deriv 
row-wise moving left
                                i = 0;
-                               d2rl  = smooth_image[yy][xx - i - 1] + 
smooth_image[yy][xx - i + 1] - 2 * smooth_image[yy][xx + i    ];
+                               d2rl  = smooth_image[yy][xx - i - 1] + 
smooth_image[yy][xx - i + 1] - 2 * smooth_image[yy][xx - i    ];
                                d2rll = smooth_image[yy][xx - i - 2] + 
smooth_image[yy][xx - i    ] - 2 * smooth_image[yy][xx - i - 1];
                                while ((d2rll < 0) && ((xx - i - 2) > areaX0 + 
1)) {
                                        i++;
@@ -435,7 +435,7 @@
 
                                // Computing zero-upcrossing of the 2nd deriv 
column-wise moving up
                                i = 0;
-                               d2cu =  smooth_image[yy - i - 1][xx] + 
smooth_image[yy - i + 1][xx] - 2 * smooth_image[yy + i    ][xx];
+                               d2cu =  smooth_image[yy - i - 1][xx] + 
smooth_image[yy - i + 1][xx] - 2 * smooth_image[yy - i    ][xx];
                                d2cuu = smooth_image[yy - i - 2][xx] + 
smooth_image[yy - i    ][xx] - 2 * smooth_image[yy - i - 1][xx];
                                while ((d2cuu < 0) && ((yy - i - 2) > areaY0 + 
1)) {
                                        i++;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/algos/statistics.c 
new/siril-1.0.6/src/algos/statistics.c
--- old/siril-1.0.5/src/algos/statistics.c      2022-09-08 10:55:15.000000000 
+0200
+++ new/siril-1.0.6/src/algos/statistics.c      2022-10-17 11:23:39.000000000 
+0200
@@ -696,7 +696,7 @@
                        }
                }
 
-               int new_index = i * s_args->seq->nb_layers;
+               int new_index = o * s_args->seq->nb_layers;
 
                if (fit->type == DATA_USHORT) {
                        if (s_args->option == (STATS_BASIC)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/core/proto.h 
new/siril-1.0.6/src/core/proto.h
--- old/siril-1.0.5/src/core/proto.h    2022-09-08 10:55:15.000000000 +0200
+++ new/siril-1.0.6/src/core/proto.h    2022-10-17 11:23:39.000000000 +0200
@@ -44,7 +44,7 @@
 #ifdef HAVE_LIBTIFF
 int readtif(const char *name, fits *fit, gboolean force_float);
 void get_tif_data_from_ui(gchar **description, gchar **copyright, gboolean 
*embeded_icc);
-int savetif(const char *name, fits *fit, uint16_t bitspersample, char 
*description, char *copyright, gboolean embeded_icc);
+int savetif(const char *name, fits *fit, uint16_t bitspersample, const char 
*description, const char *copyright, gboolean embeded_icc);
 #endif
 
 #ifdef HAVE_LIBJPEG
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/filters/asinh.c 
new/siril-1.0.6/src/filters/asinh.c
--- old/siril-1.0.5/src/filters/asinh.c 2022-09-08 10:55:15.000000000 +0200
+++ new/siril-1.0.6/src/filters/asinh.c 2022-10-17 11:23:39.000000000 +0200
@@ -145,7 +145,7 @@
                        x = buf[RLAYER][i];
                        double xprime = max(0, (x - offset) / (1.0 - offset));
                        k = (xprime == 0.0) ? 0.0 : (beta == 0.0) ? 1.0 : 
asinh(beta * xprime) / (xprime * asinh_beta);
-                       buf[RLAYER][i] = min(1.0, max(0.0,(x * k)));
+                       buf[RLAYER][i] = min(1.0, max(0.0,(xprime * k)));
                }
        }
        invalidate_stats_from_fit(fit);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/filters/banding.c 
new/siril-1.0.6/src/filters/banding.c
--- old/siril-1.0.5/src/filters/banding.c       2022-09-08 10:55:15.000000000 
+0200
+++ new/siril-1.0.6/src/filters/banding.c       2022-10-17 11:23:39.000000000 
+0200
@@ -194,7 +194,7 @@
        double invsigma = 1.0 / sigma;
 
        if (applyRotation) {
-               point center = {gfit.rx / 2.0, gfit.ry / 2.0};
+               point center = {fit->rx / 2.0, fit->ry / 2.0};
                cvRotateImage(fit, center, 90.0, -1, OPENCV_AREA);
        }
 
@@ -261,7 +261,7 @@
        invalidate_stats_from_fit(fit);
        clearfits(fiximage);
        if ((!ret) && applyRotation) {
-               point center = {gfit.rx / 2.0, gfit.ry / 2.0};
+               point center = {fit->rx / 2.0, fit->ry / 2.0};
                cvRotateImage(fit, center, -90.0, -1, OPENCV_AREA);
        }
 
@@ -276,7 +276,7 @@
        double invsigma = 1.0 / sigma;
 
        if (applyRotation) {
-               point center = {gfit.rx / 2.0, gfit.ry / 2.0};
+               point center = {fit->rx / 2.0, fit->ry / 2.0};
                cvRotateImage(fit, center, 90.0, -1, OPENCV_AREA);
        }
 
@@ -342,7 +342,7 @@
        invalidate_stats_from_fit(fit);
        clearfits(fiximage);
        if ((!ret) && applyRotation) {
-               point center = {gfit.rx / 2.0, gfit.ry / 2.0};
+               point center = {fit->rx / 2.0, fit->ry / 2.0};
                cvRotateImage(fit, center, -90.0, -1, OPENCV_AREA);
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/filters/rgradient.c 
new/siril-1.0.6/src/filters/rgradient.c
--- old/siril-1.0.5/src/filters/rgradient.c     2022-09-08 10:55:15.000000000 
+0200
+++ new/siril-1.0.6/src/filters/rgradient.c     2022-10-17 11:23:39.000000000 
+0200
@@ -130,7 +130,7 @@
                                to_polar(x, y, center, &r, &theta);
 
                                // Positive differential
-                               to_cartesian(r - args->dR, theta + dAlpha, 
center, &delta);
+                               to_cartesian(r + args->dR, theta + dAlpha, 
center, &delta);
                                if (delta.x < 0)
                                        delta.x = fabs(delta.x);
                                else if (delta.x > w)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/io/image_formats_libraries.c 
new/siril-1.0.6/src/io/image_formats_libraries.c
--- old/siril-1.0.5/src/io/image_formats_libraries.c    2022-09-08 
10:55:15.000000000 +0200
+++ new/siril-1.0.6/src/io/image_formats_libraries.c    2022-10-17 
11:23:39.000000000 +0200
@@ -632,7 +632,7 @@
 
 /*** This function save the current image into a uncompressed 8- or 16-bit 
file *************/
 
-int savetif(const char *name, fits *fit, uint16_t bitspersample, char 
*description, char *copyright, gboolean embeded_icc){
+int savetif(const char *name, fits *fit, uint16_t bitspersample, const char 
*description, const char *copyright, gboolean embeded_icc){
        int retval = 0;
        float norm;
        gchar *filename = g_strdup(name);
@@ -669,11 +669,9 @@
        TIFFSetField(tif, TIFFTAG_COMPRESSION, get_compression_mode());
        if (description) {
                TIFFSetField(tif, TIFFTAG_IMAGEDESCRIPTION, description);
-               g_free(description);
        }
        if (copyright) {
                TIFFSetField(tif, TIFFTAG_COPYRIGHT, copyright);
-               g_free(copyright);
        }
        TIFFSetField(tif, TIFFTAG_MINSAMPLEVALUE, fit->mini);
        TIFFSetField(tif, TIFFTAG_MAXSAMPLEVALUE, fit->maxi);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/io/ser.c new/siril-1.0.6/src/io/ser.c
--- old/siril-1.0.5/src/io/ser.c        2022-09-08 10:55:15.000000000 +0200
+++ new/siril-1.0.6/src/io/ser.c        2022-10-17 11:23:39.000000000 +0200
@@ -619,7 +619,7 @@
        ser_file->writer = malloc(sizeof(struct seqwriter_data));
        ser_file->writer->write_image_hook = ser_write_image_for_writer;
        ser_file->writer->sequence = ser_file;
-       
+
        siril_log_message(_("Created SER file %s\n"), filename);
        start_writer(ser_file->writer, ser_file->frame_count);
        return 0;
@@ -648,6 +648,10 @@
                perror("SER file open");
                return -1;
        }
+#ifdef _OPENMP
+       omp_init_lock(&ser_file->fd_lock);
+       omp_init_lock(&ser_file->ts_lock);
+#endif
        if (ser_read_header(ser_file)) {
                fprintf(stderr, "SER: reading header failed, closing file %s\n",
                                filename);
@@ -655,11 +659,6 @@
                return -1;
        }
        ser_file->filename = strdup(filename);
-
-#ifdef _OPENMP
-       omp_init_lock(&ser_file->fd_lock);
-       omp_init_lock(&ser_file->ts_lock);
-#endif
        return 0;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/pixelMath/pixel_math_runner.c 
new/siril-1.0.6/src/pixelMath/pixel_math_runner.c
--- old/siril-1.0.5/src/pixelMath/pixel_math_runner.c   2022-09-08 
10:55:15.000000000 +0200
+++ new/siril-1.0.6/src/pixelMath/pixel_math_runner.c   2022-10-17 
11:23:39.000000000 +0200
@@ -498,6 +498,7 @@
        if (c == '\0') return TRUE;
        if (c == '(') return TRUE;
        if (c == ')') return TRUE;
+       if (c == ',') return TRUE;
        for (int i = 0; i < MAX_OPERATORS; i++) {
                const gchar op = operators[i].name[0];
                if (c == op) return TRUE;
@@ -557,7 +558,7 @@
        gchar **token = g_strsplit(entry_text, ",", -1);
        int nargs = g_strv_length(token);
 
-       /* now we pare equality */
+       /* now we parse equality */
        for (int i = 0; i < nargs; i++) {
                gchar **expr = g_strsplit(token[i], "=", -1);
                int n = g_strv_length(expr);
@@ -663,6 +664,7 @@
                                _("Parameter symbols could not be parsed."));
                return 1;
        }
+       printf("[%s]\n", expression1);
 
        args->expression1 = expression1;
        args->expression2 = single_rgb ? NULL : expression2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/siril-1.0.5/src/pixelMath/tinyexpr.c 
new/siril-1.0.6/src/pixelMath/tinyexpr.c
--- old/siril-1.0.5/src/pixelMath/tinyexpr.c    2022-09-08 10:55:15.000000000 
+0200
+++ new/siril-1.0.6/src/pixelMath/tinyexpr.c    2022-10-17 11:23:39.000000000 
+0200
@@ -491,8 +491,10 @@
 static te_expr *power(state *s) {
     /* <power>     =    {("-" | "+")} <base> */
     int sign = 1;
+    int neg = 0;
     while (s->type == TOK_INFIX && (s->function == add || s->function == sub 
|| s->function == inverse)) {
         if (s->function == sub || s->function == inverse) sign = -sign;
+        if (s->function == sub) neg = 1;
         next_token(s);
     }
 
@@ -523,7 +525,7 @@
     } else {
         if (logical == 0) {
             ret = NEW_EXPR(TE_FUNCTION1 | TE_FLAG_PURE, base(s));
-            if (s->function == sub) {
+            if (neg) {
                ret->function = negate;
             } else {
                ret->function = inverse;

Reply via email to