Skip to content

Conversation

@reza0310
Copy link

@reza0310 reza0310 commented Oct 21, 2025

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

@nimrof
Copy link
Collaborator

nimrof commented Oct 21, 2025

Could you give us a little info about the bug?

@reza0310
Copy link
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.

@reza0310 reza0310 changed the title [FIX] Fixed a bug where parity of arguments mattered too much [EDSSHARP][FIX] Fixed a bug where parity of arguments mattered too much Nov 4, 2025
@reza0310 reza0310 changed the title [EDSSHARP][FIX] Fixed a bug where parity of arguments mattered too much [CLI][FIX] Fixed a bug where parity of arguments mattered too much Nov 5, 2025
@nimrof nimrof self-requested a review November 5, 2025 19:50
Copy link
Collaborator

@nimrof nimrof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for late review and thanks for the explaining

Looks good

@nimrof nimrof merged commit c532ad5 into CANopenNode:main Nov 5, 2025
4 checks passed
@reza0310 reza0310 deleted the patch-2 branch November 13, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants