Skip to content

Commit

Permalink
Removed limit of 127 keys per sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Dec 2, 2022
1 parent a8e8e61 commit eaecca9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/client/ServerPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace {
void write_key_sequence(Serializer& s, const KeySequence& sequence) {
s.write(static_cast<uint8_t>(sequence.size()));
s.write(static_cast<uint32_t>(sequence.size()));
for (const auto& event : sequence) {
s.write(event.key);
s.write(event.data);
Expand Down
4 changes: 2 additions & 2 deletions src/server/ClientPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
namespace {
KeySequence read_key_sequence(Deserializer& d) {
auto sequence = KeySequence();
auto size = d.read<uint8_t>();
for (auto i = 0; i < size; ++i) {
auto size = d.read<uint32_t>();
for (auto i = 0u; i < size; ++i) {
auto& event = sequence.emplace_back();
d.read(&event.key);
d.read(&event.data);
Expand Down

0 comments on commit eaecca9

Please sign in to comment.