Skip to content

Instantly share code, notes, and snippets.

@lodle
Created August 31, 2010 03:34
Show Gist options
  • Save lodle/558503 to your computer and use it in GitHub Desktop.
Save lodle/558503 to your computer and use it in GitHub Desktop.
From 32339a202769c7474ee51c82cf4703cec67dbbc5 Mon Sep 17 00:00:00 2001
From: Mark Chandler <mark@moddb.com>
Date: Mon, 30 Aug 2010 20:40:59 -0700
Subject: [PATCH] Fixes bug when offset is over 32bits but node.js returns -1 instead of correct offset
---
src/node_file.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/node_file.cc b/src/node_file.cc
index 18c3704..1e02cc4 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -602,7 +602,7 @@ static Handle<Value> Open(const Arguments& args) {
}
}
-#define GET_OFFSET(a) (a)->IsInt32() ? (a)->IntegerValue() : -1;
+#define GET_OFFSET(a) (a)->IsNumber() ? (a)->IntegerValue() : -1;
// bytesWritten = write(fd, data, position, enc, callback)
// Wrapper for write(2).
--
1.7.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment