A few more updates, including new ASIO files (GS).
[rtaudio-cdist.git] / RtAudio.cpp
index 356315102b80d0a802209e233e7bcb448575d740..4b600bdb7d6866227658b2d90e54ae89b71c6528 100644 (file)
@@ -10,7 +10,7 @@
     RtAudio WWW site: http://www.music.mcgill.ca/~gary/rtaudio/\r
 \r
     RtAudio: realtime audio i/o C++ classes\r
-    Copyright (c) 2001-2012 Gary P. Scavone\r
+    Copyright (c) 2001-2013 Gary P. Scavone\r
 \r
     Permission is hereby granted, free of charge, to any person\r
     obtaining a copy of this software and associated documentation files\r
@@ -4991,8 +4991,8 @@ static std::string convertTChar( LPCTSTR name )
 {\r
 #if defined( UNICODE ) || defined( _UNICODE )\r
   int length = WideCharToMultiByte(CP_UTF8, 0, name, -1, NULL, 0, NULL, NULL);\r
-  std::string s( length, 0 );\r
-  length = WideCharToMultiByte(CP_UTF8, 0, name, wcslen(name), &s[0], length, NULL, NULL);\r
+  std::string s( length-1, '\0' );\r
+  WideCharToMultiByte(CP_UTF8, 0, name, -1, &s[0], length, NULL, NULL);\r
 #else\r
   std::string s( name );\r
 #endif\r