Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1210 for code/branches


Ignore:
Timestamp:
May 1, 2008, 12:11:03 PM (17 years ago)
Author:
rgrieder
Message:
  • bugfix in String.cc, removeTrailingWhitespaces() changed pos2 to unsigned int so that 0 - 1 != 4294967295, which would actually be > 0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/input/src/util/String.cc

    r1111 r1210  
    6565{
    6666    unsigned int pos1 = 0;
    67     unsigned int pos2 = str.size() - 1;
     67    int pos2 = str.size() - 1;
    6868    for (; pos1 < str.size() && (str[pos1] == ' ' || str[pos1] == '\t' || str[pos1] == '\n'); pos1++);
    69     for (; pos2 >= 0         && (str[pos2] == ' ' || str[pos2] == '\t' || str[pos2] == '\n'); pos2--);
     69    for (; pos2 > 0          && (str[pos2] == ' ' || str[pos2] == '\t' || str[pos2] == '\n'); pos2--);
    7070    return str.substr(pos1, pos2 - pos1 + 1);
    7171}
Note: See TracChangeset for help on using the changeset viewer.