diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-08-01 21:35:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-08-01 22:40:36 +0300 |
commit | fc854786ed73fe768d6a3ca22c02f7013560a930 (patch) | |
tree | 3a12f555d194679957559760567ff8eb701b494b /src/utils/mkdir.cpp | |
parent | 09d74d9273cca445b7019edacaff53452a1eee3c (diff) | |
download | manaplus-fc854786ed73fe768d6a3ca22c02f7013560a930.tar.gz manaplus-fc854786ed73fe768d6a3ca22c02f7013560a930.tar.bz2 manaplus-fc854786ed73fe768d6a3ca22c02f7013560a930.tar.xz manaplus-fc854786ed73fe768d6a3ca22c02f7013560a930.zip |
Fix code style.
Diffstat (limited to 'src/utils/mkdir.cpp')
-rw-r--r-- | src/utils/mkdir.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp index 4632bec84..f73af6db5 100644 --- a/src/utils/mkdir.cpp +++ b/src/utils/mkdir.cpp @@ -54,6 +54,9 @@ int mkdir_r(const char *pathname) int len = static_cast<int>(strlen(tmp)); + if (len < 1) + return -1; + // terminate the pathname with '/' if (tmp[len - 1] != '/') { |