diff gtk4/dw.c @ 2855:86286f528adf

Fix new safety warnings reported by the new GCC on Linux. The semaphore code is used on other platforms... make sure all platforms using this code are the same.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 15 Nov 2022 03:50:00 +0000
parents 8a5131cbbe93
children 59106bf7f9f4
line wrap: on
line diff
--- a/gtk4/dw.c	Tue Nov 15 02:29:56 2022 +0000
+++ b/gtk4/dw.c	Tue Nov 15 03:50:00 2022 +0000
@@ -7793,7 +7793,7 @@
                {
                   memcpy(newarray, array, sizeof(struct _dw_seminfo)*z);
                   if(z!=(connectcount-1))
-                     memcpy(&newarray[z], &array[z+1], sizeof(struct _dw_seminfo)*(z-connectcount-1));
+                     memcpy(&newarray[z], &array[z+1], sizeof(struct _dw_seminfo)*(connectcount-(z+1)));
                }
                connectcount--;