Project

General

Profile

Bug #138 ยป loop.patch

Sylvain Laperche, 05/29/2012 06:49 AM

View differences:

src/util.c
98 98
char *
99 99
shortenstr(char *str, int len)
100 100
{
101
	int i = 0;
102 101
	int slen = (int)strlen(str);
103 102

  
104 103
	if (slen < len + 1)
105 104
		return str;
106 105
		/* NOTREACHED */
107 106

  
108
	while (i++ < (slen - len))
109
		str++;
107
	str += (slen - len);
110 108

  
111 109
	str[0] = '+';
112 110

  
    (1-1/1)