From 8740057ab563464f7eefe2591ac9a5fbd4167e7c Mon Sep 17 00:00:00 2001 From: Lars Kuhtz Date: Sun, 1 Aug 2021 04:59:24 -0700 Subject: [PATCH] Support approximateSize on db bigger than 4 GB (#777) By using napi_create_int64 instead of napi_create_int32. Closes #776. --- binding.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.cc b/binding.cc index 3d0ed733..476326c9 100644 --- a/binding.cc +++ b/binding.cc @@ -1033,7 +1033,7 @@ struct ApproximateSizeWorker final : public PriorityWorker { void HandleOKCallback () override { napi_value argv[2]; napi_get_null(env_, &argv[0]); - napi_create_uint32(env_, (uint32_t)size_, &argv[1]); + napi_create_int64(env_, (uint64_t)size_, &argv[1]); napi_value callback; napi_get_reference_value(env_, callbackRef_, &callback); CallFunction(env_, callback, 2, argv);