szaghi / FLAP

Fortran command Line Arguments Parser for poor people
151 stars 34 forks source link

Bug when parsing? #24

Closed victorsndvg closed 9 years ago

victorsndvg commented 9 years ago

Hello Stefano,

I think that i have found a potential bug:

if the user writes duplicate or wrong switches through the command line it could happen than in line:

https://github.com/szaghi/FLAP/blob/b135fb872a3c6c9cc9b0e572f639f218fd86cbb1/src/Data_Type_Command_Line_Interface.F90#L1198

The index a could be bigger than cli%Na. If it happens we get a segmentation fault.

I thinks that in this point this index a is not related with the cli%cla(a) option

Best regards, Víctor.

szaghi commented 9 years ago

So bad... I am now working on a new strongly modified version... I try to check if this bug is yet into the testing version. Thank you very much for your great help!

victorsndvg commented 9 years ago

Hi Stefano,

I've checked for this bug and it works as expected now, It reports the wrong use of the CLI to the user with a error message. :+1:

It seems that FLAP has a new new face now! I will help you to test it

szaghi commented 9 years ago

Your help is very very appreciated!

I think I have introduced more bugs than the ones I have fixed... but with your testing help they will be fixed quickly!