# HG changeset patch # User William Astle # Date 1464580251 21600 # Node ID 56f53e48ab50a410d7f2e09a19ab2bf082b56289 # Parent e94940ca17e70298c60008bdf5059f22fb57cb9f Fix off by one bug in protocol extension negotiation. Arrays are indexed from zero!!!! diff -r e94940ca17e7 -r 56f53e48ab50 src/lwwire.c --- a/src/lwwire.c Sun May 29 11:10:25 2016 -0600 +++ b/src/lwwire.c Sun May 29 21:50:51 2016 -0600 @@ -336,7 +336,7 @@ if (lwwire_read(buf, 1) < 0) return; // NAK the request - buf[1] = 0x55; + buf[0] = 0x55; lwwire_write(buf, 1); } @@ -347,7 +347,7 @@ if (lwwire_read(buf, 1) < 0) return; // ACK disabling any unsupported extensions - buf[1] = 0x42; + buf[0] = 0x42; lwwire_write(buf, 1); }