aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/windows/string_utils-inl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/windows/string_utils-inl.h b/src/common/windows/string_utils-inl.h
index ade99792..db18124d 100644
--- a/src/common/windows/string_utils-inl.h
+++ b/src/common/windows/string_utils-inl.h
@@ -49,6 +49,15 @@
#define WIN_STRING_FORMAT_LL "I64"
#endif // MSC_VER >= 1400
+// A nonconforming version of swprintf, without the length argument, was
+// included with the CRT prior to MSVC8. Although a conforming version was
+// also available via an overload, it is not reliably chosen. _snwprintf
+// behaves as a standards-confirming swprintf should, so force the use of
+// _snwprintf when using older CRTs.
+#if _MSC_VER < 1400 // MSVC 2005/8
+#define swprintf _snwprintf
+#endif // MSC_VER < 1400
+
namespace google_breakpad {
using std::string;