1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-03 04:14:20 +01:00

fixed bug with infinite loop in some circumstances in fitText() in WINGs

This commit is contained in:
dan
2004-11-06 20:20:05 +00:00
parent acc868d91d
commit 9f89695c48
3 changed files with 10 additions and 10 deletions

View File

@@ -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;
}