浏览代码

[bug fix]: dirname building single char string wrong.

Former-commit-id: dc4c3379b4b1cf6b86ca6f9a9fcde35bd83905e1
Alec Jacobson 6 年之前
父节点
当前提交
855f60f9f6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/igl/dirname.cpp

+ 1 - 1
include/igl/dirname.cpp

@@ -33,7 +33,7 @@ IGL_INLINE std::string igl::dirname(const std::string & path)
   }else if(1 == (last_slash.base() - path.begin()))
   }else if(1 == (last_slash.base() - path.begin()))
   {
   {
     // Slash is first char
     // Slash is first char
-    return std::string(&del);
+    return std::string(1,del);
   }else if(path.end() == last_slash.base() )
   }else if(path.end() == last_slash.base() )
   {
   {
     // Slash is last char
     // Slash is last char