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/CaBSP/CaBSP.cpp

    r136 r138  
    143143    { 
    144144        // Dateinamen abtrennen (mit Extension). 
    145         int i=strlen(WorldPathName)-1; 
    146  
    147         while (i>=0 && WorldPathName[i]!='/' && WorldPathName[i]!='\\') i--; 
    148         strncpy(WorldName, WorldPathName+i+1, 256); 
     145        size_t i=strlen(WorldPathName); 
     146 
     147        while (i>0 && WorldPathName[i-1]!='/' && WorldPathName[i-1]!='\\') i--; 
     148        strncpy(WorldName, WorldPathName+i, 256); 
    149149        WorldName[255]=0; 
    150150 
    151151        // Extension abtrennen. 
    152         i=strlen(WorldName)-1; 
    153  
    154         while (i>=0 && WorldName[i]!='.') i--; 
    155         if (i>=0) WorldName[i]=0; 
     152        i=strlen(WorldName); 
     153 
     154        while (i>0 && WorldName[i-1]!='.') i--; 
     155        if (i>0) WorldName[i-1]=0; 
    156156    } 
    157157