Skip to content

Commit

Permalink
info is zero-based
Browse files Browse the repository at this point in the history
  • Loading branch information
thegecko committed May 7, 2023
1 parent cf8ea55 commit f3b0650
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/peripheral.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,9 +577,9 @@ Napi::Value Peripheral::Notify(const Napi::CallbackInfo &info) {
return env.Undefined();
}

const Napi::String cbService = info[1].As<Napi::String>();
const Napi::String cbChar = info[2].As<Napi::String>();
Napi::Function cbFn = info[3].As<Napi::Function>();
const Napi::String cbService = info[0].As<Napi::String>();
const Napi::String cbChar = info[1].As<Napi::String>();
Napi::Function cbFn = info[2].As<Napi::Function>();
simpleble_uuid_t service;
simpleble_uuid_t characteristic;

Expand Down Expand Up @@ -640,9 +640,9 @@ Napi::Value Peripheral::Indicate(const Napi::CallbackInfo &info) {
return env.Undefined();
}

const Napi::String cbService = info[1].As<Napi::String>();
const Napi::String cbChar = info[2].As<Napi::String>();
Napi::Function cbFn = info[3].As<Napi::Function>();
const Napi::String cbService = info[0].As<Napi::String>();
const Napi::String cbChar = info[1].As<Napi::String>();
Napi::Function cbFn = info[2].As<Napi::Function>();
simpleble_uuid_t service;
simpleble_uuid_t characteristic;

Expand Down

0 comments on commit f3b0650

Please sign in to comment.