Skip to content

Commit

Permalink
Mistakenly removed a SetFilePointerEx, putting it back and fixing som…
Browse files Browse the repository at this point in the history
…e looong spacing.
  • Loading branch information
jeffbryner committed May 15, 2013
1 parent 552cd02 commit f0ba773
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Binary file modified NBDServer.exe
Binary file not shown.
9 changes: 1 addition & 8 deletions main.cpp
Expand Up @@ -490,7 +490,7 @@ DWORD WINAPI blockServe(LPVOID data){
cur_offset = add_li(foffset, from);

// seek to 'from'
if (type!=2 && !bMemory && SetFilePointer(fh, cur_offset.LowPart, &cur_offset.HighPart, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
if (type!=2 && !bMemory && SetFilePointerEx(fh, cur_offset,NULL, FILE_BEGIN) == 0)
{
errorLog(sformat("Error seeking in file %s to position %lld (%llx): %u", filename,
cur_offset.QuadPart, cur_offset.QuadPart, GetLastError()));
Expand Down Expand Up @@ -683,11 +683,6 @@ DWORD WINAPI blockServe(LPVOID data){
}







int main(int argc, char *argv[])
{
bool verbose=false;
Expand Down Expand Up @@ -831,6 +826,4 @@ int main(int argc, char *argv[])
if (debug){
debugFile.close();
}


}

0 comments on commit f0ba773

Please sign in to comment.