diff --git a/src/wutil.cpp b/src/wutil.cpp index 24069b398..c21fa199d 100644 --- a/src/wutil.cpp +++ b/src/wutil.cpp @@ -348,7 +348,7 @@ wchar_t *wrealpath(const wcstring &pathname, wchar_t *resolved_path) { if (narrow_res) { real_path.append(narrow_res); } else { - int pathsep_idx = narrow_path.rfind('/'); + ssize_t pathsep_idx = narrow_path.rfind('/'); if (pathsep_idx == 0) { // If the only pathsep is the first character then it's an absolute path with a // single path component and thus doesn't need conversion.