modelica-tools / csv-compare

Tool to compare curves from one csv files with curves from other csv files using an adjustable tolerance
https://www.modelica.org
BSD 3-Clause "New" or "Revised" License
25 stars 15 forks source link

incorrect if statement fixed #15

Closed bastianbin closed 9 years ago

bastianbin commented 9 years ago

fixed potential error with incorrect if statement. the tokenizer is now used for every line parsing process.

The original statement

if (options.Delimiter.Equals(options.Separator))
    dataValues = Tokenize(sLine, options.Delimiter); //use custom tokenizer for improved performance
else
    dataValues = sLine.Split(options.Delimiter); //use ordinary Split function for simple cases

was always false since otherwise it would've been impossible to corretcly read the csv file. now it always uses the Tokenizer and throws an ArgumentException if delimiter and separator are equal.

bastianbin commented 9 years ago

Fixed another condition that was supposed to skip comments.