From: Good Guy Date: Tue, 6 Dec 2022 15:22:32 +0000 (-0700) Subject: Credit Andrew fix for unalignment in Slackware 15 X-Git-Tag: 2022-12~4 X-Git-Url: https://cinelerra-gg.org/git/?a=commitdiff_plain;h=3c7c8a08800c3e100388996f0e2c2eea9761ebe1;p=goodguy%2Fcinelerra.git Credit Andrew fix for unalignment in Slackware 15 --- diff --git a/cinelerra-5.1/guicast/bctheme.C b/cinelerra-5.1/guicast/bctheme.C index 1ec64c7f..9addf9f7 100644 --- a/cinelerra-5.1/guicast/bctheme.C +++ b/cinelerra-5.1/guicast/bctheme.C @@ -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();