Hideki IWAMOTO writes:
Current `tr' implementation has a problem, if `plain char' is signed. [current cvs version] >echo a | _install/usr/bin/tr '\0' '\377' Segmentation fault (core dumped) [patched version] >echo a | _install/usr/bin/tr '\0' '\377' a
This commit is contained in:
parent
d20d37559f
commit
ed43806c3b
@ -202,9 +202,9 @@ extern int tr_main(int argc, char **argv)
|
||||
map(input, input_length, output, output_length);
|
||||
}
|
||||
for (i = 0; i < input_length; i++)
|
||||
invec[(int)input[i]] = TRUE;
|
||||
invec[(unsigned char)input[i]] = TRUE;
|
||||
for (i = 0; i < output_length; i++)
|
||||
outvec[(int)output[i]] = TRUE;
|
||||
outvec[(unsigned char)output[i]] = TRUE;
|
||||
}
|
||||
convert();
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user