Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

An exception is thrown when the value contains a space after the quotes #57

Closed
JendaBe opened this issue Oct 24, 2023 · 1 comment
Closed

Comments

@JendaBe
Copy link

JendaBe commented Oct 24, 2023

When parsing the following line in a DBC file
VAL_ 1234 Signal_Name 0 "24h" 1 " 12h AM/PM" ;
an exception is thrown from the ExtensionsAndHelpers.ToDictionary.
The code
var valueTable = match.Groups[4].Value.TrimStart().Replace("" ", """ + Environment.NewLine);
in ValueTableLineParser.TryParse replaces space between 12h by the new line and it causes an exception.

@Whitehouse112
Copy link
Contributor

Hi @JendaBe ,
thanks for spot the issue. The fix is ready and will be available in the next release.

Regards

Whitehouse112 added a commit to Whitehouse112/DbcParser that referenced this issue Oct 27, 2023
…alue [in VAL_ / VAL_TABLE_ tag] contain spaces between quotes. Added new tests.
Adhara3 added a commit that referenced this issue Nov 1, 2023
…ring

#57 Avoid exception when value contains a space after the quotes
@Adhara3 Adhara3 closed this as completed Nov 6, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants