Skip to content

Commit

Permalink
Supplemental fix for issue 14846
Browse files Browse the repository at this point in the history
`new Input!(Range, ErrorLevel)` should take the `input` parameter to initialize its field by that, because: if `Range` is a nested struct, its context pointer is not accessible from inside CsvReader.
  • Loading branch information
9rnsr committed Jul 29, 2015
1 parent b34ff32 commit 5cdf726
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions std/csv.d
Expand Up @@ -850,8 +850,7 @@ public:
*/
this(Range input, Separator delimiter, Separator quote)
{
_input = new Input!(Range, ErrorLevel);
_input.range = input;
_input = new Input!(Range, ErrorLevel)(input);
_separator = delimiter;
_quote = quote;

Expand Down Expand Up @@ -880,8 +879,7 @@ public:
*/
this(Range input, Header colHeaders, Separator delimiter, Separator quote)
{
_input = new Input!(Range, ErrorLevel);
_input.range = input;
_input = new Input!(Range, ErrorLevel)(input);
_separator = delimiter;
_quote = quote;

Expand Down

0 comments on commit 5cdf726

Please sign in to comment.