aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ralloc.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-02-02 07:04:22 +0000
committermarha <marha@users.sourceforge.net>2011-02-02 07:04:22 +0000
commit60107fb2d201703dba061622101dafc139559bca (patch)
treeaf6428702dda8e5036a563b2f8d5c8efee603c48 /mesalib/src/glsl/ralloc.c
parent0bf07d32cbd460220c67d726900772cf3692746d (diff)
downloadvcxsrv-60107fb2d201703dba061622101dafc139559bca.tar.gz
vcxsrv-60107fb2d201703dba061622101dafc139559bca.tar.bz2
vcxsrv-60107fb2d201703dba061622101dafc139559bca.zip
libX11 mesalib git update 2 Feb 2011
Diffstat (limited to 'mesalib/src/glsl/ralloc.c')
-rw-r--r--mesalib/src/glsl/ralloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ralloc.c b/mesalib/src/glsl/ralloc.c
index fa2dd8b01..3ba5d86cd 100644
--- a/mesalib/src/glsl/ralloc.c
+++ b/mesalib/src/glsl/ralloc.c
@@ -392,7 +392,15 @@ printf_length(const char *fmt, va_list untouched_args)
va_list args;
va_copy(args, untouched_args);
+#ifdef _MSC_VER
+ /* We need to use _vcsprintf to calculate the size as vsnprintf returns -1
+ * if the number of characters to write is greater than count.
+ */
+ size = _vscprintf(fmt, args);
+ (void)junk;
+#else
size = vsnprintf(&junk, 1, fmt, args);
+#endif
assert(size >= 0);
return size;