[VSDK] CreateDataBase(const char* inFullPath, ...)

Ruslan Zasukhin sunshine at public.kherson.ua
Sun Mar 16 10:12:24 CST 2003


on 3/16/03 3:44 AM, Eric Forget at forgete at cafederic.com wrote:

> Hi,
> 
> The first parameter of CreateDataBase(const char* inFullPath, ...) is const.
> However, FBL_Path2Spec() modify it. E.g.:
> 
>   char         filename[] = "/Users/eric/Database";
>   
>   CreateDataBase(filename);                   // Works
>   CreateDataBase("/Users/eric/Database");     // Crashes on Mac OS X

Eric,

I assume this is with Macho Target, yes?

As you can see, FBL_Path2Spec simply insert ZERO so I get folder path

        "/Users/eric"

Later return back delimiter...

I do not understand, is it prohibited to change buffer of const char* ???
I have think that if I restore original state of string this is normal...

May be OS X protect buffer of const string.
Cool...


Eric, FBL_Utilities.cpp with FBL_Path2Spec() is included into archive of
VSDK? I do not remember.

If yes then you can fix problem self, copying folder path into OTHER buffer.
If no then it needs rebuild it..

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina mailing list