[CLI][FIX] Fixed a bug where parity of arguments mattered too much#191
Merged
nimrof merged 2 commits intoCANopenNode:mainfrom Nov 5, 2025
Merged
[CLI][FIX] Fixed a bug where parity of arguments mattered too much#191nimrof merged 2 commits intoCANopenNode:mainfrom
nimrof merged 2 commits intoCANopenNode:mainfrom
Conversation
Collaborator
|
Could you give us a little info about the bug? |
Author
|
Yes so basically argv was incremented twice each loop (once by the for, once IN the loop) and as such only checked argv[0], argv[2] etc... which works with the compiled version but if the command you use have an odd number of words (e.g. using dotnet for example), it checked in between where the --infile, --outfile and --filetype args where and didn't find them... Incrementing only once by loop (twice only when we find what we are looking for) patches this. |
nimrof
approved these changes
Nov 5, 2025
Collaborator
nimrof
left a comment
There was a problem hiding this comment.
sorry for late review and thanks for the explaining
Looks good
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.
EDSSHARP was meant to be executed with a compiled version but I found it easier, on Linux, to use dotnet and not compile. As such, the command I used to execute the program (so without any argument) had an even number of arguments which didn't work because this program is meant to be used with an odd number. This behaviour being quite arbitrary, I decided to make it more flexible by enabling the program to search arguments wherever they might be.
For the tests, I tried executing the program with arguments in multiple places and it worked (that's not a lot I know XD).
I have read and agree to the Developer's Certificate of Origin 1.1