Avoid pushing in currentEntityTuples if it isn't initialized.#143
Open
pareizaga wants to merge 1 commit intoskymakerolof:developfrom
Open
Avoid pushing in currentEntityTuples if it isn't initialized.#143pareizaga wants to merge 1 commit intoskymakerolof:developfrom
pareizaga wants to merge 1 commit intoskymakerolof:developfrom
Conversation
|
The current tuple (non-0) will be discarded. Is that intended? Wouldn't it be better to initialize currentEntityTuples above? |
Author
|
It's intentional, it avoids this kind of error without changing the current behavior. But it may not be the most correct. As you say, a better solution could be to initialize the variable before. Another possible solution would be to ignore the tuples of type 999, which are comments and not touch the behavior for the other cases. I will modify the PR with the solution that seems best to you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The library throws an exception when loading several files generated with DG Nest because it tries to push currentEntityTuples before it is initialized. These files start with type 999 instead of 0.
Avoiding to push if currentEntityTuples is uninitialized solves the problem.
One of the files that gives an error is file 16 downloadable from https://tangenta-software.com/download/dxf-example-files/