aboutsummaryrefslogtreecommitdiff
path: root/c/datalistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r--c/datalistview.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp
index b728fa8..1ceeb3b 100644
--- a/c/datalistview.cpp
+++ b/c/datalistview.cpp
@@ -57,21 +57,21 @@ void DataListView::ShowEpisode(const int iEpisode)
PL_predicate("episode_datum", 3, "episode_data"), t);
for (int i = 0; PL_next_solution(q); i++) {
- TCHAR* tszKey;
- TCHAR* tszValue;
+ std::basic_string<TCHAR> tstrKey;
+ std::basic_string<TCHAR> tstrValue;
- if (!(PlGet(t+1, &tszKey) && PlGet(t+2, &tszValue)))
+ if (!(PlGet(t+1, &tstrKey) && PlGet(t+2, &tstrValue)))
continue;
lviKey.mask = LVIF_TEXT;
lviKey.iItem = i;
lviKey.iSubItem = 0;
- lviKey.pszText = tszKey;
+ lviKey.pszText = tstrKey.data();
ListView_InsertItem(hWnd, &lviKey);
lviValue.iItem = i;
lviValue.iSubItem = 1;
- lviValue.pszText = tszValue;
+ lviValue.pszText = tstrValue.data();
ListView_SetItem(hWnd, &lviValue);
}