Skip to content

Commit

Permalink
Merge pull request #20 from joaopedrotaveira/master
Browse files Browse the repository at this point in the history
  • Loading branch information
LennartHennigs authored Oct 3, 2024
2 parents d39d8fe + be6da34 commit 409a430
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SimpleFSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void SimpleFSM::add(Transition newTransitions[], int size) {
// Allocate or expand storage for transitions with exact size
Transition* temp = new Transition[num_standard + uniqueCount];
if (transitions != NULL) {
memcpy(temp, transitions, num_standard * sizeof(Transition));
memcpy((void*)temp, transitions, num_standard * sizeof(Transition));
delete[] transitions;
}
transitions = temp;
Expand Down Expand Up @@ -186,7 +186,7 @@ void SimpleFSM::add(TimedTransition newTransitions[], int size) {
// Allocate memory or expand existing storage with exact size
TimedTransition* temp = new TimedTransition[num_timed + uniqueCount];
if (timed != NULL) {
memcpy(temp, timed, num_timed * sizeof(TimedTransition));
memcpy((void*)temp, timed, num_timed * sizeof(TimedTransition));
delete[] timed;
}
timed = temp;
Expand Down

0 comments on commit 409a430

Please sign in to comment.