Moved assignment to within safe block
This commit is contained in:
@@ -1942,7 +1942,10 @@ YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( std::istream* file, int size )
|
||||
|
||||
b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
{
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
b->yy_buf_size = size;
|
||||
|
||||
|
||||
@@ -607,10 +607,10 @@ bool ZipArchive::CheckZipErrorCode(ZRESULT result) const
|
||||
{
|
||||
unsigned buf_size = 1025;
|
||||
char* buf = new (std::nothrow) char[buf_size];
|
||||
buf[buf_size - 1] = 0;
|
||||
|
||||
if (buf)
|
||||
{
|
||||
buf[buf_size - 1] = 0;
|
||||
|
||||
FormatZipMessage(result, buf, buf_size - 1);
|
||||
|
||||
//print error message
|
||||
|
||||
Reference in New Issue
Block a user