From e8b88e668e109701a5ec684ea3d0772fd2cda380 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Fri, 8 Apr 2011 12:38:25 -0400 Subject: [PATCH] Fixing bug with databit, stopbit, and parity not being set properly. --- serialport_native/serialport_native.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serialport_native/serialport_native.cc b/serialport_native/serialport_native.cc index a2bca75..c9810bc 100644 --- a/serialport_native/serialport_native.cc +++ b/serialport_native/serialport_native.cc @@ -119,14 +119,14 @@ namespace node { if (args.Length() >= 4 && !args[3]->IsInt32()) { return scope.Close(THROW_BAD_ARGS); } else { - Stop_Bits = args[2]->Int32Value(); + Stop_Bits = args[3]->Int32Value(); } // Parity Arguments if (args.Length() >= 5 && !args[4]->IsInt32()) { return scope.Close(THROW_BAD_ARGS); } else { - Parity = args[2]->Int32Value(); + Parity = args[4]->Int32Value(); }