mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-25 05:51:01 +00:00
Q_strlcat minor bugfix
This commit is contained in:
parent
5692388da1
commit
1d0f979bf9
1 changed files with 3 additions and 2 deletions
|
@ -1152,12 +1152,13 @@ Q_strlcat(char *dst, const char *src, int size)
|
|||
{
|
||||
char *d = dst;
|
||||
|
||||
while (*d)
|
||||
while (size > 0 && *d)
|
||||
{
|
||||
size--;
|
||||
d++;
|
||||
}
|
||||
|
||||
return (d - dst) + Q_strlcpy(d, src, size - (d - dst));
|
||||
return (d - dst) + Q_strlcpy(d, src, size);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue