revamp-strings (#1)
Co-authored-by: Abdelrahman Said <said.abdelrahman@flawlessai.com> Reviewed-on: #1 Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com> Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit is contained in:
@@ -47,7 +47,7 @@ void dirup(char *dst, u64 levels, const char *path) {
|
||||
}
|
||||
|
||||
char tmp[256];
|
||||
sprintf(tmp, "%c", PATH_SEP);
|
||||
snprintf(tmp, 2, "%c", PATH_SEP);
|
||||
// NOTE (Abdelrahman): Conditions stored in variables to silence MSVC warning C5045
|
||||
bool insufficient_levels = sep_count < levels;
|
||||
bool path_to_copy_is_separator = strncmp(path, tmp, copy_count) != 0;
|
||||
|
||||
Reference in New Issue
Block a user