RETURN_FALSE;
}
- if (remove_path && remove_path_len > 1 && (remove_path[strlen(remove_path) - 1] == '/' ||
- remove_path[strlen(remove_path) - 1] == '\\')) {
- remove_path[strlen(remove_path) - 1] = '\0';
+ if (remove_path && remove_path_len > 1) {
+ int tmp_idx = (int)strlen(remove_path) - 1;
+ if (remove_path[tmp_idx] == '/' || remove_path[tmp_idx] == '\\') {
+ remove_path[tmp_idx] = '\0';
+ }
}
if (type == 1) {