Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /ScriptEdit.cpp [828aba] .. [477acb] Maximize Restore

  Switch to side-by-side view

--- a/ScriptEdit.cpp
+++ b/ScriptEdit.cpp
@@ -337,20 +337,23 @@
         res=-1;
       }
     }
-    if(!res) res=filelength(fhandle);
-    if(res>=0)
-    {
-      pos=m_text.GetBufferSetLength(res);
-      if(pos)
-      {
-        if(read(fhandle,pos,res)!=res) res=-1;
-        else res=0;
-      }
-      else res=-1;
-      m_text.ReleaseBuffer();
-      m_text_control.SetWindowText(m_text);
-    }
-    close(fhandle);
+    if(!res)
+    {
+      res=filelength(fhandle);
+      if(res>=0)
+      {
+        pos=m_text.GetBufferSetLength(res);
+        if(pos)
+        {
+          if(read(fhandle,pos,res)!=res) res=-1;
+          else res=0;
+        }
+        else res=-1;
+        m_text.ReleaseBuffer();
+        m_text_control.SetWindowText(m_text);
+      }
+      close(fhandle);
+    }
     switch(res)
     {
     case 0: