diff --git a/Doc/changelog.docu b/Doc/changelog.docu
index 8f07e75e..91c1aca7 100644
--- a/Doc/changelog.docu
+++ b/Doc/changelog.docu
@@ -58,6 +58,8 @@
- PLY Reader: Fixed CR LF newline handling for binary file headers.
- Obj writer: Fix OBJ material files and face color (Thanks to Sven-Kristofer Pilz for the patch)
+- Obj writer: Fix OBJ writer bug file extension removal (Thanks to Katharina Breininger for the patch)
+
Tools
diff --git a/src/OpenMesh/Core/IO/writer/OBJWriter.cc b/src/OpenMesh/Core/IO/writer/OBJWriter.cc
index f89e8e0c..b1e8838a 100644
--- a/src/OpenMesh/Core/IO/writer/OBJWriter.cc
+++ b/src/OpenMesh/Core/IO/writer/OBJWriter.cc
@@ -115,7 +115,7 @@ write(const std::string& _filename, BaseExporter& _be, Options _opt, std::stream
}
//remove the file extension
- dot = _filename.find_last_of(".");
+ dot = objName_.find_last_of(".");
if(dot != std::string::npos)
objName_ = objName_.substr(0,dot);