1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 05:51:02 +02:00

Fix print length - again

# I hope _this_ is the right fix...
This commit is contained in:
Stanislav Malyshev
2000-08-14 15:54:57 +00:00
parent 821042278e
commit 159abaa900

View File

@@ -184,7 +184,7 @@ php_sprintf_appendstring(char **buffer, int *pos, int *size, char *add,
}
}
PRINTF_DEBUG(("sprintf: appending \"%s\"\n", add));
strncpy(&(*buffer)[*pos], add, max_width-*pos+1);
strncpy(&(*buffer)[*pos], add, MIN(max_width, len)+1);
*pos += MIN(max_width, len);
if (alignment == ALIGN_LEFT) {
while (npad--) {