Changeset 12279

Show
Ignore:
Timestamp:
09/28/07 19:42:12 (1 year ago)
Author:
mloskot
Message:

Fixed random issue about truncating filed values in GML driver (Ticket #1844).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/ogr/ogrsf_frmts/gml/gmlpropertydefn.cpp

    r10645 r12279  
    8484{ 
    8585/* -------------------------------------------------------------------- */ 
    86 /*      We can't get more general than string, so at this point just    */ 
    87 /*      give up on changing.                                            */ 
    88 /* -------------------------------------------------------------------- */ 
    89     if( m_eType == GMLPT_String ) 
    90     { 
    91         /* grow the Width to the length of the string passed in */ 
    92         int nWidth; 
    93         nWidth = strlen(pszValue); 
    94         if ( m_nWidth < nWidth )  
    95             SetWidth( nWidth ); 
    96         return; 
    97     } 
    98  
    99 /* -------------------------------------------------------------------- */ 
    10086/*      If it is a zero length string, just return.  We can't deduce    */ 
    10187/*      much from this.                                                 */ 
     
    121107        { 
    122108            m_eType = GMLPT_String; 
    123             return; 
     109 
     110            /* Skip forward to calculate property width. */ 
     111            break; 
    124112        } 
    125113    } 
    126114 
    127     if( m_eType == GMLPT_Untyped || m_eType == GMLPT_Integer ) 
     115    if( m_eType == GMLPT_String ) 
     116    { 
     117        /* grow the Width to the length of the string passed in */ 
     118        int nWidth; 
     119        nWidth = strlen(pszValue); 
     120        if ( m_nWidth < nWidth )  
     121            SetWidth( nWidth ); 
     122    } 
     123    else if( m_eType == GMLPT_Untyped || m_eType == GMLPT_Integer ) 
    128124    { 
    129125        if( bIsReal )