Skip to content

Commit

Permalink
buf
Browse files Browse the repository at this point in the history
  • Loading branch information
Gruetzig committed Jan 6, 2025
1 parent ffd73a6 commit b1131c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ DrawContext ctx;
#define SERVER_ADDRESS "0.0.0.0"
#endif

void enter(char* inout) {
void enter(char* inout, size_t len) {
SwkbdState swkbd;
swkbdInit(&swkbd, SWKBD_TYPE_NORMAL, 1, 50);
swkbdInit(&swkbd, SWKBD_TYPE_NORMAL, 1, len);
swkbdSetInitialText(&swkbd, inout);
swkbdInputText(&swkbd, inout, 51);
swkbdInputText(&swkbd, inout, len+1);
return;
}

Expand Down Expand Up @@ -107,10 +107,10 @@ int main() {
switch(menustate) {
case 0:
if ((kDown & KEY_X) && (kDown & KEY_DDOWN)) {
enter(address);
enter(address, 51);
}
if (kDown & KEY_Y) {
enter(discordtag);
enter(discordtag, 32);
}
if (strlen(address) > 0 && strlen(discordtag) > 0 && kDown & KEY_TOUCH) {
menustate++;
Expand Down

0 comments on commit b1131c5

Please sign in to comment.