Change iscanf() to fgets() for renaming files and creating folders (Fixes #20) (#21)

* Change iscanf() to fgets() to fix Issue #20

* Actually change it correctly

* Fix new line being at the end on the input
This commit is contained in:
Epicpkmn11 2018-10-28 18:44:11 -05:00 committed by RocketRobz
parent daaa8910d5
commit 3a7b91a5fe

View File

@ -562,7 +562,8 @@ string browseForFile (void) {
keyboardShow();
printf("Rename to: \n");
iscanf("%s", newName);
fgets(newName, 256, stdin);
newName[strlen(newName)-1] = 0;
keyboardHide();
consoleClear();
@ -623,7 +624,8 @@ string browseForFile (void) {
keyboardShow();
printf("Name for new folder: \n");
iscanf("%s", newName);
fgets(newName, 256, stdin);
newName[strlen(newName)-1] = 0;
keyboardHide();
consoleClear();