Subversion Repositories Kolibri OS

Rev

Rev 1906 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1906 Rev 3301
Line 13... Line 13...
13
 
13
 
14
    if( !get_fileinfo(path, &info) )
14
    if( !get_fileinfo(path, &info) )
Line 15... Line 15...
15
    {
15
    {
16
 
16
 
17
        file = user_alloc( info.size );
17
        file = (void*)user_alloc( info.size );
18
        read_file(path, file, 0, info.size, &bytes );
18
        read_file(path, file, 0, info.size, &bytes );
19
        if( bytes == info.size )
19
        if( bytes == info.size )
20
        {
20
        {
21
            if ( *(uint32_t*)file == 0x4B43504B )
21
            if ( *(uint32_t*)file == 0x4B43504B )
22
            {
22
            {
23
                void *tmp = NULL;
23
                void *tmp = NULL;
24
                info.size = ((size_t*)file)[1];
24
                info.size = ((size_t*)file)[1];
25
                tmp = user_alloc(info.size);
25
                tmp = (void*)user_alloc(info.size);
26
                unpack(file, tmp);
26
                unpack(file, tmp);
27
                user_free(file);
27
                user_free(file);
28
                file = tmp;
28
                file = tmp;