DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Poss minor bug in JrDebug::ParseCommandlineArgString - version 1.01.18  (Read 16,991 times)

walkerr

  • Participant
  • Joined in 2007
  • *
  • Posts: 2
Been using this version, and had a problem where quoted strings were in the command line - the inquote variable never gets set false basically.

The following fix seems to work

at line 60 in my copy, I have the def of the function:

bool JrDebug::ParseCommandlineArgString(const char* commandlinestr,char *arg0,bool &foundcommandlineargs)

then from line 104:

else if ((c==34 && inquote==true) || (inquote==false && c==32) || c==0)
{
//rhw-marker
inquote=false;
//rhw-marker

The new line surrounded by marker just to reset inquote flag once quoted arg is stored

-- Rob

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Great find, Rob, you're right - it's definitely needed.

Updating my version and i'll credit you in the release notes for next release :)

walkerr

  • Participant
  • Joined in 2007
  • *
  • Posts: 2
You're welcome - and thanks

To be honest, I'm more of a Java programmer these days. My C++ is very rusty - JrDebug has been a big help to me untangling the rubbish code I've been writing!

- Rob

Original address: https://www.donationcoder.com/forum/index.php?topic=7361.0