Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > e548512dcc847653815f1b7adc710b15 > files > 7

libvmime07-0.7.1-4.fc13.src.rpm

Patch by Zarafa <http://www.zarafa.com/> - on Debian machines, you need to configure the locales
(languages) that will be used on the system. When you use a locale (eg. 'LC_MESSAGES=nl_NL', but did not
configure your distribution to have this locale present on your system, a NULL pointer would have thrown
an exception in the std::string class. This makes sure that exception never happens.

--- libvmime-0.7.1/src/platforms/posix/posixHandler.cpp			2005-04-30 09:53:21.000000000 +0200
+++ libvmime-0.7.1/src/platforms/posix/posixHandler.cpp.broken-locale	2006-12-28 17:29:43.883410000 +0100
@@ -106,9 +106,9 @@
 
 const vmime::charset posixHandler::getLocaleCharset() const
 {
-	vmime::string prevLocale(::setlocale(LC_ALL, ""));
+	char *prevLocale = ::setlocale(LC_ALL, "");
 	vmime::charset ch(::nl_langinfo(CODESET));
-	::setlocale(LC_ALL, prevLocale.c_str());
+	::setlocale(LC_ALL, prevLocale);
 
 	return (ch);
 }