-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Description
I wanted to use CBString::format() function in my logger implementation, but it causes access violation errors in my application (it's always in the same place, if I replace code with char[] everything works just fine).
Similar code using c-strings works just fine:
void log(const char* format, const char* arg1, const char* arg2)
{
char buffer[2048];
sprintf_s((char*)&buffer, sizeof(buffer), format, arg1, arg2);
logtofile(buffer);
}Example with CBString::format:
// this causes AV errors sometimes, don't know exactly why
void logBStrLib(const char* format, const char* arg1, const char* arg2)
{
Bstrlib::CBString buffer;
buffer.format(format, arg1, arg2);
logtofile((const char*)buffer);
}Metadata
Metadata
Assignees
Labels
No labels