Skip to content
This repository
Browse code

proper length calc

  • Loading branch information...
commit 5156e6842a41aa55c6268301995df5a1fa2c918a 1 parent a2f79ed
Michael Stephens authored September 28, 2009

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  local_gridfile.cpp
2  local_gridfile.cpp
@@ -37,7 +37,7 @@ int LocalGridFile::write(const char *buf, size_t nbyte, off_t offset)
37 37
         chunk_num++;
38 38
     }
39 39
 
40  
-    _length += written;
  40
+    _length = max(_length, (int)offset + written);
41 41
     _dirty = true;
42 42
     
43 43
     return written;

0 notes on commit 5156e68

Please sign in to comment.
Something went wrong with that request. Please try again.