[Pkg-javascript-commits] [node-leveldown] 150/492: fix: check that UINT32_OPTION_VALUE is a Uint32

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Sun Jul 6 17:13:54 UTC 2014


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to annotated tag rocksdb-0.10.1
in repository node-leveldown.

commit a31bf08c7a9471cff53904fcdefc1515a687621b
Author: David Björklund <david.bjorklund at gmail.com>
Date:   Mon Jan 7 02:11:35 2013 +0100

    fix: check that UINT32_OPTION_VALUE is a Uint32
---
 src/levelup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/levelup.h b/src/levelup.h
index 5250208..1c9b3e9 100644
--- a/src/levelup.h
+++ b/src/levelup.h
@@ -40,7 +40,7 @@
 #define BOOLEAN_OPTION_VALUE_DEFTRUE(optionsObj, opt) \
   bool opt = !optionsObj->Has(option_ ## opt) || optionsObj->Get(option_ ## opt)->BooleanValue();
 #define UINT32_OPTION_VALUE(optionsObj, opt, default) \
-  uint32_t opt = optionsObj->Has(option_ ## opt) ? optionsObj->Get(option_ ## opt)->Uint32Value() : default;
+  uint32_t opt = optionsObj->Has(option_ ## opt) && optionsObj->Get(option_ ## opt)->IsUint32() ? optionsObj->Get(option_ ## opt)->Uint32Value() : default;
 
 void RunCallback (v8::Persistent<v8::Function> callback, v8::Local<v8::Value> argv[], int length);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git



More information about the Pkg-javascript-commits mailing list