Fixed bug that caused input glitches (trailing line feeds and
difficulty entering type codes) on EFI version.
This commit is contained in:
2
NEWS
2
NEWS
@@ -1,6 +1,8 @@
|
|||||||
1.0.1 (?/??/2015):
|
1.0.1 (?/??/2015):
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
- Fixed bug that caused input glitches in EFI version of gdisk.
|
||||||
|
|
||||||
- Fixed bug that caused sgdisk to not return an appropriate error code
|
- Fixed bug that caused sgdisk to not return an appropriate error code
|
||||||
when it encountered a write error when saving changes.
|
when it encountered a write error when saving changes.
|
||||||
|
|
||||||
|
|||||||
11
support.cc
11
support.cc
@@ -39,9 +39,16 @@ extern int __sscanf( const char * str , const char * format , ... ) ;
|
|||||||
string ReadString(void) {
|
string ReadString(void) {
|
||||||
string inString;
|
string inString;
|
||||||
char efiString[256];
|
char efiString[256];
|
||||||
|
int stringLength;
|
||||||
|
|
||||||
fgets(efiString, 255, stdin);
|
if (fgets(efiString, 255, stdin) != NULL) {
|
||||||
inString = efiString;
|
stringLength = strlen(efiString);
|
||||||
|
if ((stringLength > 0) && (efiString[stringLength - 1] == '\n'))
|
||||||
|
efiString[stringLength - 1] = '\0';
|
||||||
|
inString = efiString;
|
||||||
|
} else {
|
||||||
|
inString = "";
|
||||||
|
}
|
||||||
return inString;
|
return inString;
|
||||||
} // ReadString()
|
} // ReadString()
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user