diff options
Diffstat (limited to 'src/stable')
| -rw-r--r-- | src/stable/myriad.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stable/myriad.cpp b/src/stable/myriad.cpp index 53250c2..d564b70 100644 --- a/src/stable/myriad.cpp +++ b/src/stable/myriad.cpp | |||
| @@ -384,7 +384,7 @@ bool Bu::Myriad::loadMyriad() | |||
| 384 | 384 | ||
| 385 | // We need to read enough so that we can gurantee that we're within a block | 385 | // We need to read enough so that we can gurantee that we're within a block |
| 386 | // that we have read the index to, plus one index. | 386 | // that we have read the index to, plus one index. |
| 387 | for( int32_t j = 0; j < iHeaderStreamBlocks; j++ ) | 387 | for( int32_t j = 0; ; j++ ) |
| 388 | { | 388 | { |
| 389 | int32_t iBlockIndex; | 389 | int32_t iBlockIndex; |
| 390 | MyriadRead( &iBlockIndex, 4 ); | 390 | MyriadRead( &iBlockIndex, 4 ); |
| @@ -455,8 +455,8 @@ void Bu::Myriad::createMyriad( int32_t iBlockSize, int32_t iPreallocateBlocks ) | |||
| 455 | int iHeaderStreamBlocks = blkDiv(iHeaderStreamBytes+4, iBlockSize ); | 455 | int iHeaderStreamBlocks = blkDiv(iHeaderStreamBytes+4, iBlockSize ); |
| 456 | 456 | ||
| 457 | //Bu::println("Initial estimate: %1 bytes / %2 cur blocks, %3 computed blocks (%4 target bytes).").arg( iHeaderStreamBytes+(iHeaderStreamBlocks*4) ).arg( iHeaderStreamBlocks ).arg( blkDiv((iHeaderStreamBytes+(iHeaderStreamBlocks*4)), iBlockSize) ).arg( iHeaderStreamBlocks*iBlockSize ); | 457 | //Bu::println("Initial estimate: %1 bytes / %2 cur blocks, %3 computed blocks (%4 target bytes).").arg( iHeaderStreamBytes+(iHeaderStreamBlocks*4) ).arg( iHeaderStreamBlocks ).arg( blkDiv((iHeaderStreamBytes+(iHeaderStreamBlocks*4)), iBlockSize) ).arg( iHeaderStreamBlocks*iBlockSize ); |
| 458 | while( iHeaderStreamBytes+(iHeaderStreamBlocks*4) | 458 | while( iHeaderStreamBytes+(iHeaderStreamBlocks*4)+4 |
| 459 | > iHeaderStreamBlocks*iBlockSize ) | 459 | >= iHeaderStreamBlocks*iBlockSize ) |
| 460 | { | 460 | { |
| 461 | iHeaderStreamBlocks = blkDiv((iHeaderStreamBytes+((iHeaderStreamBlocks+1)*4)), iBlockSize); | 461 | iHeaderStreamBlocks = blkDiv((iHeaderStreamBytes+((iHeaderStreamBlocks+1)*4)), iBlockSize); |
| 462 | if( iHeaderStreamBlocks > 100 ) | 462 | if( iHeaderStreamBlocks > 100 ) |
