Skip to content

Commit bb4d30e

Browse files
author
Spacehuhn
committed
Fixed command queue
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.
1 parent 77f9792 commit bb4d30e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SimpleCLI",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"keywords": "cli, parser, command, line, interface",
55
"description": "Add a command line interface to your project the easy way",
66
"repository": {

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SimpleCLI
2-
version=1.1.0
2+
version=1.1.1
33
author=Spacehuhn
44
maintainer=Stefan Kremser <[email protected]>
55
sentence=A Command Line Interface Library for Arduino

src/SimpleCLI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void SimpleCLI::parse(const char* str, size_t len) {
8181
// When parsing was successful
8282
if (e->mode == CMD_PARSE_SUCCESS) {
8383
if (h->callback && !pauseParsing) h->callback(h);
84-
else cmdQueue = cmd_push(cmdQueue, cmd_move(h), commandQueueSize);
84+
else cmdQueue = cmd_push(cmdQueue, cmd_copy(h), commandQueueSize);
8585

8686
success = true;
8787
}

src/SimpleCLI.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99

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

12-
#define SIMPLECLI_VERSION "1.1.0"
12+
#define SIMPLECLI_VERSION "1.1.1"
1313
#define SIMPLECLI_VERSION_MAJOR 1
1414
#define SIMPLECLI_VERSION_MINOR 1
15-
#define SIMPLECLI_VERSION_REVISION 0
15+
#define SIMPLECLI_VERSION_REVISION 1
1616

1717
class SimpleCLI {
1818
private:

0 commit comments

Comments
 (0)