2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00
[SVN r15536]
This commit is contained in:
Dave Abrahams
2002-09-28 08:03:38 +00:00
parent 8f0b7b9fe2
commit 94a316578a
2 changed files with 2 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ static char* allocate(size_t n)
nalloc = STRING_BLOCK;
/* allocate a new block and link into the chain */
new_block = malloc( offsetof( strblock, data[nalloc] ) );
new_block = malloc( offsetof( strblock, data[0] ) + nalloc * sizeof(new_block->data[0]) );
if ( new_block == 0 )
return 0;
new_block->next = strblock_chain;

View File

@@ -74,7 +74,7 @@ static char* allocate(size_t n)
nalloc = STRING_BLOCK;
/* allocate a new block and link into the chain */
new_block = malloc( offsetof( strblock, data[nalloc] ) );
new_block = malloc( offsetof( strblock, data[0] ) + nalloc * sizeof(new_block->data[0]) );
if ( new_block == 0 )
return 0;
new_block->next = strblock_chain;