[xoreos-git] [xoreos/xoreos] 43d7a4: COMMON: Fix INFLATE without size when size evenly ...

GitHub noreply at github.com
Sun Aug 5 11:04:46 CEST 2018


  Branch: refs/heads/master
  Home:   https://github.com/xoreos/xoreos
  Commit: 43d7a448cabf2eea0eea48b8f5b0f0945f55c6b2
      https://github.com/xoreos/xoreos/commit/43d7a448cabf2eea0eea48b8f5b0f0945f55c6b2
  Author: Sven Hesse <drmccoy at drmccoy.de>
  Date:   2018-08-05 (Sun, 05 Aug 2018)

  Changed paths:
    M src/common/deflate.cpp

  Log Message:
  -----------
  COMMON: Fix INFLATE without size when size evenly divides frame size

When decompressing without knowing the output size beforehand, we
decompress into buffers of frameSize length and then paste them
together into one output buffer at the end.

When pasting, we used to calculate the size of the last frame with
"% frameSize", which, if the output size evenly divides the frame
size, is of course 0.

We could just check for 0 there and use the frame size instead then,
but using a running counter of bytes left to write is easier.


  Commit: e31e98af64d05a74f68518a2c7704ee6a203e815
      https://github.com/xoreos/xoreos/commit/e31e98af64d05a74f68518a2c7704ee6a203e815
  Author: Sven Hesse <drmccoy at drmccoy.de>
  Date:   2018-08-05 (Sun, 05 Aug 2018)

  Changed paths:
    M tests/common/deflate.cpp

  Log Message:
  -----------
  TESTS: Add a test for the even-divide case in INFLATE without size


Compare: https://github.com/xoreos/xoreos/compare/b56b28c9b80a...e31e98af64d0
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the xoreos-git mailing list