Show
Ignore:
Timestamp:
08/27/10 18:55:42 (21 months ago)
Author:
Carsten
Message:

Code enhancements for the native 64-bit Windows (LLP64) port.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/CaTools/CaSanity.cpp

    r136 r138  
    103103    { 
    104104        // Dateinamen abtrennen (mit Extension). 
    105         int i=strlen(WorldPathName)-1; 
    106  
    107         while (i>=0 && WorldPathName[i]!='/' && WorldPathName[i]!='\\') i--; 
    108         strncpy(WorldName, WorldPathName+i+1, 256); 
     105        size_t i=strlen(WorldPathName); 
     106 
     107        while (i>0 && WorldPathName[i-1]!='/' && WorldPathName[i-1]!='\\') i--; 
     108        strncpy(WorldName, WorldPathName+i, 256); 
    109109        WorldName[255]=0; 
    110110 
    111111        // Extension abtrennen. 
    112         i=strlen(WorldName)-1; 
    113  
    114         while (i>=0 && WorldName[i]!='.') i--; 
    115         if (i>=0) WorldName[i]=0; 
     112        i=strlen(WorldName); 
     113 
     114        while (i>0 && WorldName[i-1]!='.') i--; 
     115        if (i>0) WorldName[i-1]=0; 
    116116    } 
    117117