From 27a77cc47487881fe7f60ae60dc2f7f2b33c3a88 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Thu, 21 Jul 2016 00:30:26 +0200 Subject: [PATCH] Fix deleting last char on ShowInputPrompt() --- source/fatfs/image.c | 2 +- source/ui.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/source/fatfs/image.c b/source/fatfs/image.c index 8ce2239..428ce1d 100644 --- a/source/fatfs/image.c +++ b/source/fatfs/image.c @@ -1,6 +1,6 @@ #include "image.h" #include "platform.h" -#include "fatfs/ff.h" +#include "ff.h" #define RAMDRV_BUFFER_O3DS ((u8*)0x22200000) // in O3DS FCRAM #define RAMDRV_SIZE_O3DS (0x01C00000) // 28MB diff --git a/source/ui.c b/source/ui.c index d2aee83..c9fb239 100644 --- a/source/ui.c +++ b/source/ui.c @@ -400,7 +400,10 @@ bool ShowInputPrompt(char* inputstr, u32 max_size, u32 resize, const char* alpha while (cursor_s >= inputstr_size) cursor_s--; cursor_a = -1; - } else if (resize == 1) inputstr[0] = alphabet[0]; + } else if (resize == 1) { + inputstr[0] = alphabet[0]; + cursor_a = 0; + } } else if (pad_state & BUTTON_Y) { if (resize && (inputstr_size < max_size - resize)) { char* inputfrom = inputstr + cursor_s - (cursor_s % resize);