Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: read integer error
Browse files Browse the repository at this point in the history
pquadri committed Nov 28, 2023
1 parent cd6d147 commit f81e259
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/include/postgres_binary_reader.hpp
Original file line number Diff line number Diff line change
@@ -227,8 +227,8 @@ struct PostgresBinaryReader {
// similarly, if trailing zeroes have been suppressed, we have not been multiplying t
// the fractional part with NBASE often enough. If so, add additional powers
if (config.ndigits > config.weight + 1) {
auto fractional_power = (config.ndigits - config.weight - 1) * DEC_DIGITS;
auto fractional_power_correction = fractional_power - config.scale;
int32_t fractional_power = (config.ndigits - config.weight - 1) * DEC_DIGITS;
int32_t fractional_power_correction = fractional_power - config.scale;
D_ASSERT(fractional_power_correction < 20);
fractional_part = 0;
for (int32_t i = MaxValue<int32_t>(0, config.weight + 1); i < config.ndigits; i++) {

0 comments on commit f81e259

Please sign in to comment.