forked from cafeberry/cafeberry
update lcemp networking
This commit is contained in:
@@ -31,7 +31,12 @@ void ByteArrayOutputStream::write(unsigned int b)
|
||||
{
|
||||
// If we will fill the buffer we need to make it bigger
|
||||
if( count + 1 >= buf.length )
|
||||
buf.resize( buf.length * 2 );
|
||||
{
|
||||
unsigned int newSize = buf.length * 2;
|
||||
if( newSize <= buf.length )
|
||||
return;
|
||||
buf.resize( newSize );
|
||||
}
|
||||
|
||||
buf[count] = (byte) b;
|
||||
count++;
|
||||
|
||||
Reference in New Issue
Block a user