- fixed a few issues found by JeffM (debian games team irc channel) while testing on Windows 7 64 bit

This commit is contained in:
Mark Vejvoda
2013-01-30 06:08:14 +00:00
parent 6acf5e9e67
commit fe942809e6
3 changed files with 11 additions and 1 deletions

View File

@@ -577,7 +577,8 @@ void TextRenderer3DGl::internalRender(const string &text, float x, float y, boo
vector<string> parts;
char szBuf[8096]="";
for (int i=0; renderText[i] != '\0'; ++i) {
//for (int i=0; renderText[i] != '\0'; ++i) {
for(size_t i=0; i < renderText.size(); ++i) {
szBuf[0] = '\0';
snprintf(szBuf,8096,"%c",renderText[i]);

View File

@@ -423,6 +423,8 @@ bool isdir(const char *path)
}
bool fileExists(const string &path) {
if (path.size() == 0) return false;
#ifdef WIN32
wstring wstr = utf8_decode(path);
FILE* file= _wfopen(wstr.c_str(), L"rb");