Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created August 18, 2013 16:03
Show Gist options
  • Save PilzAdam/6262390 to your computer and use it in GitHub Desktop.
Save PilzAdam/6262390 to your computer and use it in GitHub Desktop.
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index b0cfa38..c6fe226 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -1149,9 +1149,8 @@ void GUIFormSpecMenu::parseTabHeader(parserData* data,std::string element) {
e->setNotClipped(true);
for (unsigned int i=0; i< buttons.size(); i++) {
- wchar_t* wbutton = 0;
-
- wbutton = (wchar_t*) narrow_to_wide(buttons[i].c_str()).c_str();
+ std::wstring wlabel = narrow_to_wide(buttons[i]);
+ wchar_t* wbutton = (wchar_t*) wlabel.c_str();
e->addTab(wbutton,-1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment