Skip to content

Commit

Permalink
Decode numeric zeros with correct scale
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitriy Chugunov authored and elprans committed May 24, 2018
1 parent 3223b1b commit 4124f7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion asyncpg/protocol/codecs/numeric.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ cdef numeric_decode_binary(ConnectionSettings settings, FastReadBuffer buf):

if num_pgdigits == 0:
# Zero
return _Dec()
return _Dec('0e-' + str(dscale))

pgdigit0 = hton.unpack_int16(buf.read(2))
if weight >= 0:
Expand Down

0 comments on commit 4124f7d

Please sign in to comment.