ChangeLog: - fixed some alignment issues in objects/metafile.c Warren Baird : Warren_Baird@cimmetry.com diff -ur clean/wine-20020509/objects/metafile.c wine-20020509/objects/metafile.c --- clean/wine-20020509/objects/metafile.c Wed Apr 3 17:46:32 2002 +++ wine-20020509/objects/metafile.c Wed May 15 17:02:15 2002 @@ -530,7 +530,13 @@ offset = mh->mtHeaderSize * 2; while (offset < mh->mtSize * 2) { - mr = (METARECORD *)((char *)mh + offset); +#ifndef ALLOW_UNALIGNED_ACCESS + METARECORD tmpMR; + memcpy(&tmpMR,((char *)mh + offset),sizeof(METARECORD)); + mr = &tmpMR; +#else + mr = (METARECORD *)((char *)mh + offset) ; +#endif TRACE("offset=%04x,size=%08lx\n", offset, mr->rdSize); if (!mr->rdSize) { @@ -636,7 +642,13 @@ while (offset < (mh->mtSize * 2)) { +#ifndef ALLOW_UNALIGNED_ACCESS + METARECORD tmpMR; + memcpy(&tmpMR,((char *)mh + offset),sizeof(METARECORD)); + mr = &tmpMR; +#else mr = (METARECORD *)((char *)mh + offset); +#endif if (!MF_CallTo16_word_wllwl( lpEnumFunc, hdc, spht, MAKESEGPTR( seg + (HIWORD(offset) << __AHSHIFT), LOWORD(offset) ), @@ -722,6 +734,13 @@ while (offset < (mh->mtSize * 2)) { mr = (METARECORD *)((char *)mh + offset); +#ifndef ALLOW_UNALIGNED_ACCESS + METARECORD tmpMR; + memcpy(&tmpMR,((char *)mh + offset),sizeof(METARECORD)); + mr = &tmpMR; +#else + mr = (METARECORD *)((char *)mh + offset) ; +#endif if(mr->rdFunction == META_EOF) { TRACE("Got META_EOF so stopping\n"); break;