Skip to content

Commit a98c421

Browse files
committed
fix: read integer error
1 parent cd6d147 commit a98c421

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/include/postgres_binary_reader.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ struct PostgresBinaryReader {
227227
// similarly, if trailing zeroes have been suppressed, we have not been multiplying t
228228
// the fractional part with NBASE often enough. If so, add additional powers
229229
if (config.ndigits > config.weight + 1) {
230-
auto fractional_power = (config.ndigits - config.weight - 1) * DEC_DIGITS;
231-
auto fractional_power_correction = fractional_power - config.scale;
230+
int32_t fractional_power = (config.ndigits - config.weight - 1) * DEC_DIGITS;
231+
int32_t fractional_power_correction = fractional_power - config.scale;
232232
D_ASSERT(fractional_power_correction < 20);
233233
fractional_part = 0;
234234
for (int32_t i = MaxValue<int32_t>(0, config.weight + 1); i < config.ndigits; i++) {

0 commit comments

Comments
 (0)