prevent overflow when grouping is in place

master
Daniel Kolesa 2017-02-26 03:27:46 +01:00
parent 7164019e22
commit 2f4f9dd440
1 changed files with 2 additions and 2 deletions

View File

@ -554,8 +554,8 @@ private:
template<typename R, typename T>
void write_int(R &writer, bool ptr, bool neg, T val) const {
/* binary representation is the biggest */
char buf[sizeof(T) * CHAR_BIT + 1];
/* binary representation is the biggest, assume grouping */
char buf[sizeof(T) * CHAR_BIT * 2];
size_t n = 0;
char isp = spec();