about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/client/lineinput.h2
-rw-r--r--src/game/editor/ed_editor.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/game/client/lineinput.h b/src/game/client/lineinput.h
index f5c65282..71612b99 100644
--- a/src/game/client/lineinput.h
+++ b/src/game/client/lineinput.h
@@ -25,7 +25,7 @@ public:
 	void Set(const char *pString);
 	const char *GetString() const { return m_Str; }
 	int GetLength() const { return m_Len; }
-	unsigned GetCursorOffset() const { return m_CursorPos; }
+	int GetCursorOffset() const { return m_CursorPos; }
 };
 
 #endif
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp
index 9fb457aa..867049e1 100644
--- a/src/game/editor/ed_editor.cpp
+++ b/src/game/editor/ed_editor.cpp
@@ -2127,8 +2127,8 @@ static void EditorListdirCallback(const char *pName, int IsDir, int StorageType,
 	int Length = str_length(pName);
 	if((pName[0] == '.' && (pName[1] == 0 ||
 		(pName[1] == '.' && pName[2] == 0 && (!str_comp(pEditor->m_pFileDialogPath, "maps") || !str_comp(pEditor->m_pFileDialogPath, "mapres"))))) ||
-		(!IsDir && (pEditor->m_FileDialogFileType == CEditor::FILETYPE_MAP && (Length < 4 || str_comp(pName+Length-4, ".map"))) ||
-		(pEditor->m_FileDialogFileType == CEditor::FILETYPE_IMG && (Length < 4 || str_comp(pName+Length-4, ".png")))))
+		(!IsDir && ((pEditor->m_FileDialogFileType == CEditor::FILETYPE_MAP && (Length < 4 || str_comp(pName+Length-4, ".map"))) ||
+		(pEditor->m_FileDialogFileType == CEditor::FILETYPE_IMG && (Length < 4 || str_comp(pName+Length-4, ".png"))))))
 		return;
 
 	CEditor::CFilelistItem Item;