mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug with for loop (#1263)
This commit is contained in:
parent
4cb8de3029
commit
a2480a6c94
2 changed files with 13 additions and 4 deletions
|
@ -222,7 +222,7 @@ string srs_string_trim_end(string str, string trim_chars)
|
|||
ret.erase(ret.end() - 1);
|
||||
|
||||
// ok, matched, should reset the search
|
||||
i = 0;
|
||||
i = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ string srs_string_trim_start(string str, string trim_chars)
|
|||
ret.erase(ret.begin());
|
||||
|
||||
// ok, matched, should reset the search
|
||||
i = 0;
|
||||
i = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ string srs_string_remove(string str, string remove_chars)
|
|||
it = ret.erase(it);
|
||||
|
||||
// ok, matched, should reset the search
|
||||
i = 0;
|
||||
i = -1;
|
||||
} else {
|
||||
++it;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue