--- Daodan/src/inifile_reader.c 2009/07/26 12:04:44 451 +++ Daodan/src/inifile_reader.c 2009/10/17 11:49:49 466 @@ -10,11 +10,10 @@ char* inifile_cleanstr(char* str) { int i; for (i = strlen(str) - 1; i >= 0; i --) - if (!isspace(str[i])) - { - str[i + 1] = '\0'; + if (isspace(str[i])) + str[i] = '\0'; + else break; - } while (isspace(*str)) str++;