Fix #117783: Allow Multiple Negatives in Numerical Inputs with Units #117819

Closed
Harley Acheson wants to merge 1 commits from Harley/blender:double_negatives into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 7 additions and 0 deletions

View File

@ -1922,6 +1922,13 @@ static bool unit_distribute_negatives(char *str, const int str_maxncpy)
{
bool changed = false;
/* Remove double negatives. */
while (char *double_negative = strstr(str, "--")) {
double_negative[0] = ' ';
double_negative[1] = ' ';
changed = true;
}
char *remaining_str = str;
while ((remaining_str = const_cast<char *>(find_next_negative(str, remaining_str))) != nullptr) {
int remaining_str_maxncpy;