Skip to content

Commit

Permalink
fix: read integer error
Browse files Browse the repository at this point in the history
  • Loading branch information
pquadri committed Nov 28, 2023
1 parent cd6d147 commit a98c421
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
Expand Up @@ -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++) {
Expand Down

0 comments on commit a98c421

Please sign in to comment.