File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ static const char* get_region(const char* id)
128
128
129
129
int main (int argc , char * argv [])
130
130
{
131
- printf ("pkg2zip v1.0 \n" );
131
+ printf ("pkg2zip v1.1 \n" );
132
132
if (argc < 2 || argc > 3 )
133
133
{
134
134
fatal ("Usage: %s file.pkg [NoNpDrmKey]\n" , argv [0 ]);
@@ -301,13 +301,15 @@ int main(int argc, char* argv[])
301
301
snprintf (path , sizeof (path ), "app/%.9s/sce_sys/package/head.bin" , id );
302
302
303
303
zip_begin_file (& z , path );
304
+ size_t head_offset = 0 ;
304
305
while (head_size != 0 )
305
306
{
306
307
uint8_t buffer [1 << 16 ];
307
308
uint32_t size = (uint32_t )min64 (head_size , sizeof (buffer ));
308
- sys_read (pkg , 0 , buffer , size );
309
+ sys_read (pkg , head_offset , buffer , size );
309
310
zip_write_file (& z , buffer , size );
310
311
head_size -= size ;
312
+ head_offset += size ;
311
313
}
312
314
zip_end_file (& z );
313
315
You can’t perform that action at this time.
0 commit comments