Repository navigation
fix(gstat): Use correct RHD, RHDE and RHDF based on header flags in gstat #9245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -344,16 +344,18 @@ ULONG Compressor::truncateTail(ULONG outLength) | |
| * Return the number of trailing input bytes that fit the given output length. | ||
| * | ||
| **************************************/ | ||
| fb_assert(m_length > outLength); | ||
| [[maybe_unused]] const bool truncateAll = m_length <= outLength; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May be it is better to fix caller (
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure that we are breaking compressor assumption. As I see, it's fine that we can have head with no data, so at least
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dyemanov, what do you think ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tend to agree that nothing is going to be broken. |
||
|
|
||
| ULONG inLength = 0; | ||
|
|
||
| if (m_runs.isEmpty()) | ||
| { | ||
| m_length -= outLength; | ||
| return outLength; | ||
| inLength = MIN(outLength, m_length); | ||
| m_length -= inLength; | ||
| return inLength; | ||
| } | ||
|
|
||
| auto space = (int) outLength; | ||
| ULONG inLength = 0; | ||
|
|
||
| while (m_runs.hasData()) | ||
| { | ||
|
|
@@ -394,7 +396,7 @@ ULONG Compressor::truncateTail(ULONG outLength) | |
| m_runs.pop(); | ||
| } | ||
|
|
||
| fb_assert(m_runs.hasData()); | ||
| fb_assert(truncateAll || m_runs.hasData()); | ||
|
|
||
| if (m_allowUnpacked) | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.