Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | Author: Franz Pletz <fpletz@franz-pletz.org> |
| 2 | Description: Don't die on unknown LS_COLORS values |
| 3 | Removing the patch causes a segfault when dircolors is set by coreutils' dircolors. |
| 4 | Debian-Bug: #592089 |
| 5 | |
| 6 | --- a/tw.color.c |
| 7 | +++ b/tw.color.c |
| 8 | @@ -239,13 +239,10 @@ parseLS_COLORS(const Char *value) |
| 9 | if ((Char)variables[i].variable[0] == (v[0] & CHAR) && |
| 10 | (Char)variables[i].variable[1] == (v[1] & CHAR)) |
| 11 | break; |
| 12 | - if (i < nvariables) { |
| 13 | - v += 3; |
| 14 | + v += 3; |
| 15 | + if (i < nvariables) |
| 16 | getstring(&c, &v, &variables[i].color, ':'); |
| 17 | - continue; |
| 18 | - } |
| 19 | - else |
| 20 | - stderror(ERR_BADCOLORVAR, v[0], v[1]); |
| 21 | + continue; |
| 22 | } |
| 23 | break; |
| 24 | } |