X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7ff32988327bcfe4905c8ebcba7b2924f02f0432..af65faa449b38729c5419a84426def9228083b8c:/src/xbt/xbt_str.c diff --git a/src/xbt/xbt_str.c b/src/xbt/xbt_str.c index 11a50b8fe4..aa61389215 100644 --- a/src/xbt/xbt_str.c +++ b/src/xbt/xbt_str.c @@ -60,7 +60,7 @@ xbt_str_rtrim(char* s, const char* char_list) while(*cur) ++cur; - while(white_char[(unsigned char)*cur] && (cur >= s)) + while((cur >= s) && white_char[(unsigned char)*cur]) --cur; *++cur = '\0'; @@ -108,7 +108,7 @@ xbt_str_ltrim( char* s, const char* char_list) while(*cur && white_char[(unsigned char)*cur]) ++cur; - return strcpy(s,cur); + return memmove(s,cur, strlen(cur)); } /** @brief Strip whitespace (or other characters) from the end and the begining of a string.