瀏覽代碼

open file 's' fix flag

dmuratshin 9 年之前
父節點
當前提交
d23a8015ab
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 3 0
      oxygine/src/core/STDFileSystem.cpp
  2. 0 2
      oxygine/src/core/file.cpp

+ 3 - 0
oxygine/src/core/STDFileSystem.cpp

@@ -86,6 +86,9 @@ namespace oxygine
         int _openedFiles = 0;
         int _openedFiles = 0;
         oxHandle* oxFileOpen(const char* filename, const char* mode)
         oxHandle* oxFileOpen(const char* filename, const char* mode)
         {
         {
+            if (*mode == 's')
+                ++mode;
+            
             LOGD("oxFileOpen %s", filename);
             LOGD("oxFileOpen %s", filename);
             oxHandle* h = oxFileOpen_(filename, mode);
             oxHandle* h = oxFileOpen_(filename, mode);
             if (h)
             if (h)

+ 0 - 2
oxygine/src/core/file.cpp

@@ -102,8 +102,6 @@ namespace oxygine
 
 
         handle open(const char* file_, const char* mode, error_policy ep)
         handle open(const char* file_, const char* mode, error_policy ep)
         {
         {
-            if (*mode == 's')
-                ++mode;
             
             
 #ifdef OX_DEBUG
 #ifdef OX_DEBUG
             if (!strstr(mode, "b"))
             if (!strstr(mode, "b"))