mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
serial: fixed parity settings on Windows - fixes #5267
This commit is contained in:
14
app/patches/@serialport+bindings+10.0.0.patch
Normal file
14
app/patches/@serialport+bindings+10.0.0.patch
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/node_modules/@serialport/bindings/src/serialport.cpp b/node_modules/@serialport/bindings/src/serialport.cpp
|
||||
index c48e150..00a5f5a 100644
|
||||
--- a/node_modules/@serialport/bindings/src/serialport.cpp
|
||||
+++ b/node_modules/@serialport/bindings/src/serialport.cpp
|
||||
@@ -269,7 +269,8 @@ Napi::Value Drain(const Napi::CallbackInfo& info) {
|
||||
}
|
||||
|
||||
inline SerialPortParity ToParityEnum(const Napi::String& napistr) {
|
||||
- const char* str = napistr.Utf8Value().c_str();
|
||||
+ auto tmp = napistr.Utf8Value();
|
||||
+ const char* str = tmp.c_str();
|
||||
size_t count = strlen(str);
|
||||
SerialPortParity parity = SERIALPORT_PARITY_NONE;
|
||||
if (!strncasecmp(str, "none", count)) {
|
Reference in New Issue
Block a user