Changeset 12304

Show
Ignore:
Timestamp:
10/03/07 00:33:59 (1 year ago)
Author:
warmerdam
Message:

fix RRDNamesList growing (#1109)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.4/gdal/frmts/hfa/hfaband.cpp

    r11142 r12304  
    15781578    // TODO: Need to add to end of array (thats pretty hard). 
    15791579    if( poRRDNamesList->SetStringField( szName, osLayerName ) != CE_None ) 
    1580         return -1; 
     1580    { 
     1581        poRRDNamesList->MakeData( poRRDNamesList->GetDataSize() + 3000 ); 
     1582        if( poRRDNamesList->SetStringField( szName, osLayerName ) != CE_None ) 
     1583            return -1; 
     1584    } 
    15811585 
    15821586/* -------------------------------------------------------------------- */ 
  • branches/1.4/gdal/frmts/hfa/hfaentry.cpp

    r10646 r12304  
    303303 
    304304        MarkDirty(); 
     305 
     306/* -------------------------------------------------------------------- */ 
     307/*      If the data already had a file position, we now need to         */ 
     308/*      clear that, forcing it to be rewritten at the end of the        */ 
     309/*      file.  Referencing nodes will need to be marked dirty so        */ 
     310/*      they are rewritten.                                             */ 
     311/* -------------------------------------------------------------------- */ 
     312        if( nFilePos != 0 ) 
     313        { 
     314            nFilePos = 0; 
     315            if (poPrev != NULL) poPrev->MarkDirty();  
     316            if (poNext != NULL) poNext->MarkDirty();  
     317            if (poChild != NULL) poChild->MarkDirty();  
     318            if (poParent != NULL) poParent->MarkDirty();  
     319        } 
    305320    } 
    306321 
  • branches/1.4/gdal/frmts/hfa/hfafield.cpp

    r11718 r12304  
    664664                                          nDataSize - nExtraOffset, 
    665665                                          chReqType, pValue ) ); 
     666            } 
     667            else 
     668            { 
     669                CPLAssert( FALSE ); 
     670                return CE_Failure; 
    666671            } 
    667672        }