@@ -458,37 +458,26 @@ static inline char* swapcopy(char* buf, char* src, size_t size) {
458
458
#define SWAPCOPY (buf , src ) swapcopy((char*)(buf),(char*)&(src),sizeof((src)))
459
459
460
460
void hfs_serialize_finderinfo (hfs_catalog_keyed_record_t * rec , char buf [32 ]) {
461
+ memset (buf ,0 ,32 );
461
462
if (rec -> type == HFS_REC_FILE ) {
462
463
buf = SWAPCOPY (buf , rec -> file .user_info .file_type );
463
464
buf = SWAPCOPY (buf , rec -> file .user_info .file_creator );
464
465
buf = SWAPCOPY (buf , rec -> file .user_info .finder_flags );
465
466
buf = SWAPCOPY (buf , rec -> file .user_info .location .v );
466
467
buf = SWAPCOPY (buf , rec -> file .user_info .location .h );
467
- buf = SWAPCOPY (buf , rec -> file .user_info .reserved );
468
-
469
- for (int i = 0 ; i < 4 ; i ++ )
470
- buf = SWAPCOPY (buf , rec -> file .finder_info .reserved [i ]);
468
+ buf += 10 ;
471
469
buf = SWAPCOPY (buf , rec -> file .finder_info .extended_finder_flags );
472
- buf = SWAPCOPY (buf , rec -> file .finder_info .reserved2 );
473
- buf = SWAPCOPY (buf , rec -> file .finder_info .put_away_folder_cnid );
474
470
}
475
471
else if (rec -> type == HFS_REC_FLDR ) {
476
472
buf = SWAPCOPY (buf , rec -> folder .user_info .window_bounds .t );
477
473
buf = SWAPCOPY (buf , rec -> folder .user_info .window_bounds .l );
478
474
buf = SWAPCOPY (buf , rec -> folder .user_info .window_bounds .b );
479
475
buf = SWAPCOPY (buf , rec -> folder .user_info .window_bounds .r );
480
-
481
476
buf = SWAPCOPY (buf , rec -> folder .user_info .finder_flags );
482
477
buf = SWAPCOPY (buf , rec -> folder .user_info .location .v );
483
478
buf = SWAPCOPY (buf , rec -> folder .user_info .location .h );
484
- buf = SWAPCOPY (buf , rec -> folder .user_info .reserved );
485
-
486
- buf = SWAPCOPY (buf , rec -> folder .finder_info .scroll_position .v );
487
- buf = SWAPCOPY (buf , rec -> folder .finder_info .scroll_position .h );
488
- buf = SWAPCOPY (buf , rec -> folder .finder_info .reserved );
479
+ buf += 10 ;
489
480
buf = SWAPCOPY (buf , rec -> folder .finder_info .extended_finder_flags );
490
- buf = SWAPCOPY (buf , rec -> folder .finder_info .reserved2 );
491
- buf = SWAPCOPY (buf , rec -> folder .finder_info .put_away_folder_cnid );
492
481
}
493
482
}
494
483
0 commit comments