From 44cd16fcc85697b5094250a89decaab5c692b392 Mon Sep 17 00:00:00 2001 From: "mmentovai@google.com" Date: Thu, 14 Aug 2008 01:25:32 +0000 Subject: DCHECK vswprintf format string cross-platform portability. Use %ls, not %s, for wchar_t* fields. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@849 0039d316-1c4b-4281-b951-d872f2087c98 --- base/string_util_posix.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'base/string_util_posix.h') diff --git a/base/string_util_posix.h b/base/string_util_posix.h index b3df2ad..a9e3646 100644 --- a/base/string_util_posix.h +++ b/base/string_util_posix.h @@ -35,6 +35,8 @@ #include #include +#include "base/logging.h" + namespace base { inline int strncasecmp(const char* string1, const char* string2, size_t count) { @@ -48,6 +50,7 @@ inline int vsnprintf(char* buffer, size_t size, inline int vswprintf(wchar_t* buffer, size_t size, const wchar_t* format, va_list arguments) { + DCHECK(IsWprintfFormatPortable(format)); return ::vswprintf(buffer, size, format, arguments); } -- cgit v1.1