Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# All Files
[*]
charset = utf-8
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true

# Makefile
[Makefile]
indent_style = tab
2 changes: 1 addition & 1 deletion .github/workflows/built.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Set current version for release naming
- name: Set current version
id: version
run: echo "VERSION=2.4${{ github.run_number }}" >> "$GITHUB_OUTPUT"
run: echo "VERSION=2.5${{ github.run_number }}" >> "$GITHUB_OUTPUT"

# Replace version number and build
- name: Built
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A Nintendo Switch (CFW) sys-module that allows users to remote control their Swi
### Remote Control:

- Set controller state
- Simulate buttons press, hold, and release
- Simulate button press, hold, and release
- Simulate touch screen drawing

### Memory Reading and Writing:
Expand Down
12 changes: 6 additions & 6 deletions sys-botbase/source/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
#include <stdlib.h>
#include <string.h>

int parseArgs(char *origargstr, int (*callback)(int, char **))
int parseArgs(char* origargstr, int (*callback)(int, char**))
{
char *argstr = malloc(strlen(origargstr) + 1);
char* argstr = malloc(strlen(origargstr) + 1);
memcpy(argstr, origargstr, strlen(origargstr) + 1);
int argc = 0;

char *tmpstr = malloc(strlen(argstr) + 1);
char* tmpstr = malloc(strlen(argstr) + 1);
memcpy(tmpstr, argstr, strlen(argstr) + 1);
for (char *p = strtok(tmpstr, " \r\n"); p != NULL; p = strtok(NULL, " \r\n")) {
for (char* p = strtok(tmpstr, " \r\n"); p != NULL; p = strtok(NULL, " \r\n")) {
argc++;
}
free(tmpstr);
Expand All @@ -20,9 +20,9 @@ int parseArgs(char *origargstr, int (*callback)(int, char **))
return (*callback)(argc, NULL);
}

char **argv = malloc(sizeof(char *) * argc);
char** argv = malloc(sizeof(char*) * argc);
int i = 0;
for (char *p = strtok(argstr, " \r\n"); p != NULL; p = strtok(NULL, " \r\n"))
for (char* p = strtok(argstr, " \r\n"); p != NULL; p = strtok(NULL, " \r\n"))
argv[i++] = p;

int ret = (*callback)(argc, argv);
Expand Down
Loading
Loading