fixed buffersize-calculation for orders.

This commit is contained in:
Enno Rehling 2006-01-29 13:52:49 +00:00
parent bc2cedd34f
commit 7819848524

View file

@ -113,12 +113,11 @@ get_command(const order * ord, char * sbuffer, size_t bufsize)
str += strlcpy(str, LOC(lang, keywords[kwd]), size);
if (text) {
*str++ = ' ';
*str = 0;
}
}
#endif
if (text) {
str += strlcpy(str, text, sizeof(sbuffer)-(str-sbuffer));
str += strlcpy(str, text, bufsize-(str-sbuffer));
}
return sbuffer;
}