Show
Ignore:
Timestamp:
04/22/10 18:08:26 (5 years ago)
Author:
robert
Message:

From Farshid Lashkari, "I've attached a small fix so that osgDB::convertStringFromUTF8toCurrentCodePage actually performs the conversion onto the destination string."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgDB/ConvertUTF.cpp

    r11111 r11364  
    150150 
    151151    std::string sDest(destLen, '\0'); 
    152     destLen = WideCharToMultiByte(CP_ACP, 0, utf16.c_str(), sourceLength, 0, 0, 0, 0); 
     152    destLen = WideCharToMultiByte(CP_ACP, 0, utf16.c_str(), sourceLength, &sDest[0], destLen, 0, 0); 
    153153    if (destLen <= 0) 
    154154    {