vsprintf crashes
vsprintf crashes
- Subject: vsprintf crashes
- From: Alfred Van Hoek <email@hidden>
- Date: Fri, 21 Apr 2006 20:45:00 -0400
Could someone enlighten me why the following crashes in my dylib? It
used to work with the previous version of Xcode, and works ok on
windows:
void dlog(char *format, ...)
{
va_list args;
char buffer[255];
va_start(args,format);
strcpy(buffer + vsprintf(buffer,format,args), "");
Str255 dst;
CopyC2P(buffer, dst);
#ifndef WIN32
DebugStr(dst);
#else
OutputDebugString(buffer);
#endif
va_end(args);
}
Thread 0 Crashed:
0 libSystem.B.dylib 0x90002f48 strlen + 8
1 libSystem.B.dylib 0x90011d7c __vfprintf + 5768
2 libSystem.B.dylib 0x90031d20 vsprintf + 224
3 My.dylib 0x0101a964 dlog + 44 (DConPrefix.cpp:200)
Alfred
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden