diff dvdread/dvd_udf.c @ 355:80a6f5839cf7 src

use memcpy() instead of struct assignment. Patch by Erik Hovland org It may not be nice (IIRC strcuct assignment should be totally equivalent) but allegedly some compilers don't work as expected.
author nicodvb
date Sat, 10 May 2008 10:07:06 +0000
parents c73a93208d14
children da4ae9160df7
line wrap: on
line diff
--- a/dvdread/dvd_udf.c	Fri May 09 21:34:39 2008 +0000
+++ b/dvdread/dvd_udf.c	Sat May 10 10:07:06 2008 +0000
@@ -501,7 +501,7 @@
     tmpmap.lbn = lbnum;
     if(GetUDFCache(device, MapCache, lbnum, &tmpmap)) {
       *FileType = tmpmap.filetype;
-      *File = tmpmap.file;
+      memcpy(File, &tmpmap.file, sizeof(tmpmap.file));
       return 1;
     }
 
@@ -514,7 +514,7 @@
 
         if( TagID == 261 ) {
             UDFFileEntry( LogBlock, FileType, partition, File );
-           tmpmap.file = *File;
+           memcpy(&tmpmap.file, File, sizeof(tmpmap.file));
            tmpmap.filetype = *FileType;
            SetUDFCache(device, MapCache, tmpmap.lbn, &tmpmap);
             return 1;