diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-10-27 18:33:43 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-10-27 18:33:43 +0200 |
commit | 89e652af2506f7cf7854ce2e6f5b9b97423d1d40 (patch) | |
tree | 23aa4029a81b79e87339fb6240984811cd65e91e /shared | |
parent | dd1d0cf34a44f70793dcb52fd9ef90d9274b55d1 (diff) |
fix dumb typo's and added comments to faulty code
Diffstat (limited to 'shared')
-rw-r--r-- | shared/protocol.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/protocol.c b/shared/protocol.c index c6e5ddd..ca0edc4 100644 --- a/shared/protocol.c +++ b/shared/protocol.c @@ -99,7 +99,10 @@ ws_s_protocol_req_parser_state* ws_protocol_req_parser_alloc() { void ws_protocol_req_cmd_init(ws_s_protocol_req_parser_state* state) { state->target = malloc(sizeof(ws_s_protocol_parsed_req_cmd) + sizeof(char*) * state->arg_len); for (unsigned int i = 0; i < state->arg_len; i++) - state->target->argv[i] = malloc(sizeof(char) * (state->args_len[i] + 1)); + state->target->argv[i] = malloc(sizeof(char) * (state->args_len[i] + 1)); // segfaults on 2nd run? + // state->target->argv stays empty according to debugger + // goes to HardFault_Handler on 2nd iteration + // this might be the stm running out of heap memory though i'm not sure state->target->argc = state->arg_len; |