Credit Andrew fix for unalignment in Slackware 15
authorGood Guy <[email protected]>
Tue, 6 Dec 2022 15:22:32 +0000 (08:22 -0700)
committerGood Guy <[email protected]>
Tue, 6 Dec 2022 15:22:32 +0000 (08:22 -0700)
cinelerra-5.1/guicast/bctheme.C

index 1ec64c7f98eadd675b338715a01aa2629275b8eb..9addf9f7eb8f888ad6db8ff81e336b9c2627a73a 100644 (file)
@@ -455,7 +455,10 @@ void BC_Theme::overlay(VFrame *dst, VFrame *src, int in_x1, int in_x2, int shift
 
 void BC_Theme::set_data(unsigned char *ptr)
 {
-       int hdr_sz = *(int*)ptr - sizeof(int);
+       //int hdr_sz = *(int*)ptr - sizeof(int);
+       int hdr_sz = 0;
+       memcpy(&hdr_sz, ptr, sizeof(int));
+       hdr_sz -= sizeof(int);
        unsigned char *cp = ptr + sizeof(int);
        unsigned char *dp = cp + hdr_sz;
        int start_item = images.size();