diff options
| author | oy <Tom_Adams@web.de> | 2010-11-21 12:33:13 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-11-21 12:33:13 +0100 |
| commit | e4f1e18c4ecd5e19eb41eddc596b5bbed8a7dc26 (patch) | |
| tree | eb7b543736ea2267630721c8a74762bc4f1dca2f | |
| parent | e7e2501d1b66d76721b3b78a780e19f52da78385 (diff) | |
| download | zcatch-e4f1e18c4ecd5e19eb41eddc596b5bbed8a7dc26.tar.gz zcatch-e4f1e18c4ecd5e19eb41eddc596b5bbed8a7dc26.zip | |
fixed entry names in the demo browser and the editor's file dialog. Closes #301
| -rw-r--r-- | src/game/client/components/menus_demo.cpp | 2 | ||||
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index 74f7ef0d..a96659d8 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -444,7 +444,7 @@ void CMenus::DemolistFetchCallback(const char *pName, int IsDir, int StorageType } else { - str_copy(Item.m_aName, pName, min(static_cast<int>(sizeof(Item.m_aName)), Length)); + str_copy(Item.m_aName, pName, min(static_cast<int>(sizeof(Item.m_aName)), Length-4)); Item.m_InfosLoaded = false; } Item.m_IsDir = IsDir != 0; diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index fc929eb5..4fa40f95 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -2138,7 +2138,7 @@ static void EditorListdirCallback(const char *pName, int IsDir, int StorageType, if(IsDir) str_format(Item.m_aName, sizeof(Item.m_aName), "%s/", pName); else - str_copy(Item.m_aName, pName, min(static_cast<int>(sizeof(Item.m_aName)), Length+1)); + str_copy(Item.m_aName, pName, min(static_cast<int>(sizeof(Item.m_aName)), Length-3)); Item.m_IsDir = IsDir != 0; Item.m_IsLink = false; Item.m_StorageType = StorageType; |