tools/detab.c: Fix a strange (but functional) conditional test noted by Alan Carvalho de Assis.

This commit is contained in:
Gregory Nutt 2018-12-03 12:38:31 -06:00
parent 8983f1c82e
commit 4a501de6b1
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ int main(int argc, char **argv, char **envp)
while (fgets(g_line, LINE_SIZE, instream) != NULL)
{
for (pos = 0, i = 0; g_line[i] && pos < LINE_SIZE && g_line[i]; i++)
for (pos = 0, i = 0; i < LINE_SIZE && g_line[i] != '\0'; i++)
{
if (g_line[i] == '\t')
{