From 3343c3a9708b8ec3e5176c68a0ce5a39bceb646a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 12 Mar 2003 15:36:26 +0000 Subject: [PATCH] Fix from Gabor for proper casting of char's to unsigned ints be setting up the osgText::String. --- src/osgText/String.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osgText/String.cpp b/src/osgText/String.cpp index e966b3ee5..bab1c03a3 100644 --- a/src/osgText/String.cpp +++ b/src/osgText/String.cpp @@ -254,7 +254,11 @@ String& String::operator = (const String& str) void String::set(const std::string& text) { clear(); - std::copy(text.begin(),text.end(),std::back_inserter(*this)); + for ( std::string::const_iterator it = text.begin(); it != text.end(); ++it ) + { + unsigned int charcode = (unsigned char )*it; + push_back( charcode ); + } } void String::set(const wchar_t* text)