mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 18:49:49 +01:00
guard empty str in removeBeginEndSpacesTabs
This commit is contained in:
parent
0208dff574
commit
a5ffd44caf
1 changed files with 3 additions and 0 deletions
|
@ -145,6 +145,9 @@ void scaleBox(wlr_box* box, float scale) {
|
|||
}
|
||||
|
||||
std::string removeBeginEndSpacesTabs(std::string str) {
|
||||
if (str.empty())
|
||||
return str;
|
||||
|
||||
int countBefore = 0;
|
||||
while (str[countBefore] == ' ' || str[countBefore] == '\t') {
|
||||
countBefore++;
|
||||
|
|
Loading…
Reference in a new issue