mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-08 18:52:31 +02:00
fixed bug with infinite loop in some circumstances in fitText() in WINGs
This commit is contained in:
1 parent
acc868d91d
commit
9f89695c48
3 files changed
+10
-10
No files matched your search
+2
-2
@@ -107,7 +107,7 @@ fitText(char *text, WMFont *font, int width, int wrap)
|
||||
int i, w, beforecrlf, word1, word2;
|
||||
|
||||
/* text length before first cr/lf */
|
||||
beforecrlf = strcspn(text, "\n\r");
|
||||
beforecrlf = strcspn(text, "\n");
|
||||
|
||||
if (!wrap || beforecrlf==0)
|
||||
return beforecrlf;
|
||||
@@ -180,7 +180,7 @@ fitText(char *text, WMFont *font, int width, int wrap)
|
||||
i = j;
|
||||
}
|
||||
} else {
|
||||
i = strcspn(text, "\n\r");
|
||||
i = strcspn(text, "\n");
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user