Skip to content

Commit

Permalink
Fixed command queue
Browse files Browse the repository at this point in the history
Some idiot (me) made the queue remember pointers that might die, instead of copying the value. 
This caused sometimes problems on the deauther with the wait command, as it would try to read a string that has been already deleted.
  • Loading branch information
Spacehuhn committed Jun 26, 2020
1 parent 77f9792 commit bb4d30e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SimpleCLI",
"version": "1.1.0",
"version": "1.1.1",
"keywords": "cli, parser, command, line, interface",
"description": "Add a command line interface to your project the easy way",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SimpleCLI
version=1.1.0
version=1.1.1
author=Spacehuhn
maintainer=Stefan Kremser <[email protected]>
sentence=A Command Line Interface Library for Arduino
Expand Down
2 changes: 1 addition & 1 deletion src/SimpleCLI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void SimpleCLI::parse(const char* str, size_t len) {
// When parsing was successful
if (e->mode == CMD_PARSE_SUCCESS) {
if (h->callback && !pauseParsing) h->callback(h);
else cmdQueue = cmd_push(cmdQueue, cmd_move(h), commandQueueSize);
else cmdQueue = cmd_push(cmdQueue, cmd_copy(h), commandQueueSize);

success = true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/SimpleCLI.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

#include "CommandError.h" // CommandError, Command, Argument

#define SIMPLECLI_VERSION "1.1.0"
#define SIMPLECLI_VERSION "1.1.1"
#define SIMPLECLI_VERSION_MAJOR 1
#define SIMPLECLI_VERSION_MINOR 1
#define SIMPLECLI_VERSION_REVISION 0
#define SIMPLECLI_VERSION_REVISION 1

class SimpleCLI {
private:
Expand Down

0 comments on commit bb4d30e

Please sign in to comment.