aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkDebug_win.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-07 18:44:34 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-07 18:44:34 +0000
commit8890af397e006a0e35a59271a288f72829d0e8a3 (patch)
tree0acdbc3d35fc5a23d7aba6b2d965818bcf2d222d /src/ports/SkDebug_win.cpp
parent807da9d1f2f2bfca9a73ff648180d6f8642d0307 (diff)
Restart va_list in SkDebugf on win32.
Review URL: https://codereview.chromium.org/12457019 git-svn-id: http://skia.googlecode.com/svn/trunk@8023 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/ports/SkDebug_win.cpp')
-rw-r--r--src/ports/SkDebug_win.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ports/SkDebug_win.cpp b/src/ports/SkDebug_win.cpp
index 30fe2b5b74..e368c9719d 100644
--- a/src/ports/SkDebug_win.cpp
+++ b/src/ports/SkDebug_win.cpp
@@ -19,10 +19,14 @@ static const size_t kBufferSize = 2048;
void SkDebugf(const char format[], ...) {
char buffer[kBufferSize + 1];
va_list args;
+
va_start(args, format);
- vsnprintf(buffer, kBufferSize, format, args);
vprintf(format, args);
va_end(args);
+ va_start(args, format);
+ vsnprintf(buffer, kBufferSize, format, args);
+ va_end(args);
+
OutputDebugStringA(buffer);
}