diff options
-rw-r--r-- | 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 5bd0237e7b..4301cdc7b4 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1130,7 +1130,7 @@ static void FTruncate(const FunctionCallbackInfo<Value>& args) { CHECK(args[0]->IsInt32()); const int fd = args[0].As<Int32>()->Value(); - CHECK(args[1]->IsNumber()); + CHECK(IsSafeJsInt(args[1])); const int64_t len = args[1].As<Integer>()->Value(); FSReqBase* req_wrap_async = GetReqWrap(env, args[2]); |