Skip to content

Commit

Permalink
fix #729
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypp committed Jul 29, 2020
1 parent 9392ace commit 28e7fed
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,20 +1217,21 @@ PR_STRING _app_rulesexpandrules (PR_STRING rule, LPCWSTR delimeter)

string = _r_obj_createstringbuilder (256 * sizeof (WCHAR));

R_STRINGREF remainingPart;
PR_STRING rulePart;
PR_STRINGREF remainingPart;

remainingPart = &rule->sr;
_r_stringref_initializeex (&remainingPart, rule->Buffer, rule->Length);

while (remainingPart->Length != 0)
while (remainingPart.Length != 0)
{
rulePart = _r_str_splitatchar (remainingPart, remainingPart, DIVIDER_RULE[0], TRUE);
rulePart = _r_str_splitatchar (&remainingPart, &remainingPart, DIVIDER_RULE[0], TRUE);

if (rulePart)
{
_r_str_trim (rulePart, DIVIDER_TRIM);

_r_string_appendformat (&string, L"%s%s", rulePart->Buffer, delimeter);
if (!_r_str_isempty (rulePart))
_r_string_appendformat (&string, L"%s%s", rulePart->Buffer, delimeter);

_r_obj_dereference (rulePart);
}
Expand Down

0 comments on commit 28e7fed

Please sign in to comment.