summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-06-23 02:53:22 +0000
committerBrian Paul <[email protected]>2002-06-23 02:53:22 +0000
commit581cc2025f6f64dbca4c78ed19510800cb05d576 (patch)
treeb654523c74a6245307787aa5dbff0829befdf7c3
parent8e7bd03760e8dec4600cb548e9027466aebdc15a (diff)
fix problems in _mesa_debug/printf()
-rw-r--r--src/mesa/main/context.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index b882f337fda..bead62cdf3d 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.172 2002/06/18 16:53:46 brianp Exp $ */
+/* $Id: context.c,v 1.173 2002/06/23 02:53:22 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2396,9 +2396,11 @@ _mesa_error( GLcontext *ctx, GLenum error, const char *where )
void
_mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
{
+ char s[1000];
va_list args;
va_start( args, fmtString );
- (void) ctx->imports.fprintf( (__GLcontext *) ctx, stderr, fmtString, args );
+ vsprintf(s, fmtString, args);
+ (void) ctx->imports.fprintf( (__GLcontext *) ctx, stderr, s );
va_end( args );
}
@@ -2409,9 +2411,11 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
void
_mesa_printf( const GLcontext *ctx, const char *fmtString, ... )
{
+ char s[1000];
va_list args;
va_start( args, fmtString );
- (void) ctx->imports.fprintf( (__GLcontext *) ctx, stdout, fmtString, args );
+ vsprintf(s, fmtString, args);
+ (void) ctx->imports.fprintf( (__GLcontext *) ctx, stdout, s );
va_end( args );
}