Results 1 to 3 of 3

Thread: A bug?

  1. #1
    Lesser Knight
    Join Date
    Jan 2011
    Posts
    32

    Default A bug?

    Just found that when you're trying to work with CL_ZipArchive loading it from memory (CL_IODeviceProvider_Memory), your program will crash on the first CL_ZipArchive::open_file function call. I've done some debugging and got this:
    Code:
    CL_IODeviceProvider *CL_IODeviceProvider_Memory::duplicate()
    {
    	return 0;
    }
    Other CL_IODeviceProvider derived classes (CL_IODeviceProvider_File for example) have a correct duplicate() method. CL_IODeviceProvider_PipeConnection throws an exception "not implemented" when using this method, and it's OK.

    I think, that this can be fixed this way:
    Code:
    CL_IODeviceProvider *CL_IODeviceProvider_Memory::duplicate()
    {
    	return new CL_IODeviceProvider_Memory(data);
    }
    Please, apply this fix to SVN, if it's really a bug.

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,769

    Default

    Yes that's a bug

    Your patch looks good.

  3. #3
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,769

    Default

    Patch applied, many thanks

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •