mirror of
https://github.com/php/php-src.git
synced 2025-01-26 13:44:22 +08:00
The -1 is no longer needed, since it is done automatically by strlcpy().
This commit is contained in:
parent
a747d1f864
commit
0a2d473df0
@ -1768,7 +1768,7 @@ PHP_FUNCTION(ncurses_termname)
|
||||
|
||||
IS_NCURSES_INITIALIZED();
|
||||
|
||||
strlcpy(temp, termname(), sizeof(temp) - 1);
|
||||
strlcpy(temp, termname(), sizeof(temp));
|
||||
temp[sizeof(temp) - 1] = '\0';
|
||||
|
||||
RETURN_STRINGL (temp, strlen(temp), 1);
|
||||
@ -1783,7 +1783,7 @@ PHP_FUNCTION(ncurses_longname)
|
||||
|
||||
IS_NCURSES_INITIALIZED();
|
||||
|
||||
strlcpy(temp, longname(), sizeof(temp) - 1);
|
||||
strlcpy(temp, longname(), sizeof(temp));
|
||||
temp[sizeof(temp) - 1] = '\0';
|
||||
|
||||
RETURN_STRINGL (temp, strlen(temp), 1);
|
||||
|
Loading…
Reference in New Issue
Block a user