mirror of
git://git.gnu.org.ua/wordsplit.git
synced 2025-04-25 16:19:54 +03:00
Fix handling of negative positional arguments
* wordsplit.c (expvar): Fix initial index
This commit is contained in:
parent
ed0e91f0bd
commit
6ab5387624
1 changed files with 1 additions and 1 deletions
|
@ -1442,7 +1442,7 @@ expvar (struct wordsplit *wsp, const char *str, size_t len,
|
|||
&& (str[1] == '-'
|
||||
&& ISDIGIT (str[2]))))) != 0))
|
||||
{
|
||||
int i0 = str[0] == '-' ? 1 : 0;
|
||||
int i0 = str[1] == '-' ? 1 : 0;
|
||||
str++;
|
||||
len--;
|
||||
for (i = i0; i < len; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue