|
Boost-Build : |
From: PAL (b84037_at_[hidden])
Date: 2004-02-14 00:14:47
> > Hmm... I have compared the original code with yours.
> > I found that
>
> --------------------------------------------------------------------------
-
> >- ---
> > LPSTR szRootKey = newstr( lol_get(frame->args, 0)->string );
> >
> > szKey = strchr(szRootKey , '\\');
> > *szKey = '\0'; ++szKey;
>
> --------------------------------------------------------------------------
-
> >- ---
> > when " *szKey = '\0' " would raise an access violation.
> > I don't know why... I remember I have already test it and been sure that
it
> > works.
>
> Do you mean that the current code crashes? When precisely does it happen?
Is
> it when szRootKey does not contain '\\' or there's something else?
>
> - Volodya
Oh, I have knew what happened. No, the code written by Dave is okay.
There would be a problem when 'szRootKey' does not contain '\\'.
And Dave' s test pattern contains '\', not '\\'.
My code doesn't filter invalid arguments, so it crashes. Sorry ...:~~~
----------------------------------------------------------------------------
---------------
ECHO [ W32_GETREG "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion" : "CurrentVersion" ] ;
----------------------------------------------------------------------------
---------------
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk