diff options
author | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-11-15 22:24:42 +0000 |
---|---|---|
committer | mmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2006-11-15 22:24:42 +0000 |
commit | 73cd14b4af906e77f3d8b019962fb9979ff12620 (patch) | |
tree | d24a12393c2f631c22db5b7e76e735b218025890 /src/common/windows/guid_string.cc | |
parent | Limit use of default namespace in tests and utility programs (#71). r=bryner (diff) | |
download | breakpad-73cd14b4af906e77f3d8b019962fb9979ff12620.tar.xz |
Airbag client libraries should compile under MSVC .NET 2003/7.1 (#64).
r=bryner
http://groups.google.com/group/airbag-dev/browse_thread/thread/b838faeb50f71818
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@64 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/windows/guid_string.cc')
-rw-r--r-- | src/common/windows/guid_string.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/common/windows/guid_string.cc b/src/common/windows/guid_string.cc index 86d5f736..42a0b21a 100644 --- a/src/common/windows/guid_string.cc +++ b/src/common/windows/guid_string.cc @@ -33,6 +33,8 @@ #include <wchar.h> +#include "common/windows/string_utils-inl.h" + #include "common/windows/guid_string.h" namespace google_airbag { @@ -40,12 +42,13 @@ namespace google_airbag { // static wstring GUIDString::GUIDToWString(GUID *guid) { wchar_t guid_string[37]; - _snwprintf_s(guid_string, sizeof(guid_string) / sizeof(wchar_t), _TRUNCATE, - L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], - guid->Data4[3], guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); + WindowsStringUtils::safe_swprintf( + guid_string, sizeof(guid_string) / sizeof(guid_string[0]), + L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + guid->Data1, guid->Data2, guid->Data3, + guid->Data4[0], guid->Data4[1], guid->Data4[2], + guid->Data4[3], guid->Data4[4], guid->Data4[5], + guid->Data4[6], guid->Data4[7]); return wstring(guid_string); } |