summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-07-03 21:18:02 +0000
committerfrosch <frosch@openttd.org>2010-07-03 21:18:02 +0000
commit9be9302cdbe5e23ad7565e7d76b9ac2414fb0796 (patch)
tree6c2efb989981357b0bdf1a11c67e4c1893845563
parent9b66684b81b6e57a23e90aa89bae9ff0615dd3a3 (diff)
downloadopenttd-9be9302cdbe5e23ad7565e7d76b9ac2414fb0796.tar.xz
(svn r20069) -Fix (r20055): Make valgrind happy.
-rw-r--r--src/hotkeys.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/hotkeys.cpp b/src/hotkeys.cpp
index 4bb12503e..eefe96adb 100644
--- a/src/hotkeys.cpp
+++ b/src/hotkeys.cpp
@@ -221,9 +221,7 @@ void SaveHotkeyGroup(IniGroup *group, T *hotkey_list)
for (uint i = 0; hotkey_list[i].num != -1; i++) {
T *hotkey = &hotkey_list[i];
IniItem *item = group->GetItem(hotkey->name, true);
- if (hotkey->keycodes.Length() > 0) {
- item->value = strdup(SaveKeycodes(hotkey));
- }
+ item->SetValue(SaveKeycodes(hotkey));
}
}