зеркало из https://github.com/microsoft/git.git
Merge branch 'jc/xstrfmt-null-with-prec-0' into maint
Code cleanup. * jc/xstrfmt-null-with-prec-0: setup.c: do not feed NULL to "%.*s" even with precision 0
This commit is contained in:
Коммит
97d5165780
2
setup.c
2
setup.c
|
@ -102,7 +102,7 @@ char *prefix_path_gently(const char *prefix, int len,
|
|||
return NULL;
|
||||
}
|
||||
} else {
|
||||
sanitized = xstrfmt("%.*s%s", len, prefix, path);
|
||||
sanitized = xstrfmt("%.*s%s", len, len ? prefix : "", path);
|
||||
if (remaining_prefix)
|
||||
*remaining_prefix = len;
|
||||
if (normalize_path_copy_len(sanitized, sanitized, remaining_prefix)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче