File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ Napi::Value Close(const Napi::CallbackInfo& info) {
130
130
Napi::Function callback = info[1 ].As <Napi::Function>();
131
131
CloseBaton* baton = new CloseBaton (callback);
132
132
baton->fd = info[0 ].ToNumber ().Int64Value ();;
133
-
133
+
134
134
baton->Queue ();
135
135
return env.Undefined ();
136
136
}
@@ -189,7 +189,7 @@ Napi::Value Set(const Napi::CallbackInfo& info) {
189
189
baton->dtr = getBoolFromObject (options, " dtr" );
190
190
baton->dsr = getBoolFromObject (options, " dsr" );
191
191
baton->lowLatency = getBoolFromObject (options, " lowLatency" );
192
-
192
+
193
193
baton->Queue ();
194
194
return env.Undefined ();
195
195
}
@@ -263,13 +263,15 @@ Napi::Value Drain(const Napi::CallbackInfo& info) {
263
263
Napi::Function callback = info[1 ].As <Napi::Function>();
264
264
DrainBaton* baton = new DrainBaton (callback);
265
265
baton->fd = fd;
266
-
266
+
267
267
baton->Queue ();
268
268
return env.Undefined ();
269
269
}
270
270
271
271
inline SerialPortParity ToParityEnum (const Napi::String& napistr) {
272
- const char * str = napistr.Utf8Value ().c_str ();
272
+ auto tmp = napistr.Utf8Value ();
273
+ const char * str = tmp.c_str ();
274
+
273
275
size_t count = strlen (str);
274
276
SerialPortParity parity = SERIALPORT_PARITY_NONE;
275
277
if (!strncasecmp (str, " none" , count)) {
You can’t perform that action at this time.
0 commit comments