summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2011-03-27 20:29:32 +0000
committerChris Wilson <chris+github@qwirx.com>2011-03-27 20:29:32 +0000
commit28b61af7bdf2131a6a502b077615130bf1d66e57 (patch)
tree2ce0700e81db00981ddc6639af175ded7732c6e2
parenteabe45952412d515c4c9092aeb319c93ec12f369 (diff)
Fix another off-by-one error.
-rw-r--r--lib/win32/emu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/win32/emu.cpp b/lib/win32/emu.cpp
index 9549a681..5b2376eb 100644
--- a/lib/win32/emu.cpp
+++ b/lib/win32/emu.cpp
@@ -988,7 +988,7 @@ DIR *opendir(const char *name)
std::string dirName(name);
//append a '\' win32 findfirst is sensitive to this
- if ( dirName[dirName.size()] != '\\' || dirName[dirName.size()] != '/' )
+ if (dirName[dirName.size()-1] != '\\' || dirName[dirName.size()-1] != '/')
{
dirName += '\\';
}
@@ -1020,7 +1020,7 @@ DIR *opendir(const char *name)
delete pDir;
return NULL;
}
-
+
pDir->result.d_name = 0;
return pDir;
}