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

    r136 r138  
    13061306    { 
    13071307        // Dateinamen abtrennen (mit Extension). 
    1308         int i=strlen(WorldPathName)-1; 
    1309  
    1310         while (i>=0 && WorldPathName[i]!='/' && WorldPathName[i]!='\\') i--; 
    1311         strncpy(WorldName, WorldPathName+i+1, 256); 
     1308        size_t i=strlen(WorldPathName); 
     1309 
     1310        while (i>0 && WorldPathName[i-1]!='/' && WorldPathName[i-1]!='\\') i--; 
     1311        strncpy(WorldName, WorldPathName+i, 256); 
    13121312        WorldName[255]=0; 
    13131313 
    13141314        // Extension abtrennen. 
    1315         i=strlen(WorldName)-1; 
    1316  
    1317         while (i>=0 && WorldName[i]!='.') i--; 
    1318         if (i>=0) WorldName[i]=0; 
     1315        i=strlen(WorldName); 
     1316 
     1317        while (i>0 && WorldName[i-1]!='.') i--; 
     1318        if (i>0) WorldName[i-1]=0; 
    13191319    } 
    13201320