summaryrefslogtreecommitdiff
path: root/gpttext.cc
diff options
context:
space:
mode:
authorsrs5694 <srs5694@users.sourceforge.net>2011-03-15 00:34:10 -0400
committersrs5694 <srs5694@users.sourceforge.net>2011-03-15 00:34:10 -0400
commit9a46b042c57144c26a67781d335e6ba4128382d2 (patch)
treea7126d54e9cd8387251787c7f1da6cfb7b44b8f2 /gpttext.cc
parentd3ba7a61f68ca97fc3828f0c2edd7cda7ca3dfda (diff)
downloadsgdisk-9a46b042c57144c26a67781d335e6ba4128382d2.tar.gz
Patches supplied by Florian Zumbiehl
Diffstat (limited to 'gpttext.cc')
-rw-r--r--gpttext.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gpttext.cc b/gpttext.cc
index e6ca8ce..aa209cb 100644
--- a/gpttext.cc
+++ b/gpttext.cc
@@ -371,7 +371,7 @@ void GPTDataTextUI::MakeHybrid(void) {
// hybrid MBR....
cout << "Type from one to three GPT partition numbers, separated by spaces, to be\n"
<< "added to the hybrid MBR, in sequence: ";
- ReadCString(line, 255);
+ ReadCString(line, sizeof(line));
numPartsToCvt = sscanf(line, "%d %d %d", &partNums[0], &partNums[1], &partNums[2]);
if (numPartsToCvt > 0) {
@@ -426,7 +426,7 @@ void GPTDataTextUI::MakeHybrid(void) {
cout << "Enter an MBR hex code (EE is EFI GPT, but may confuse MacOS): ";
// Comment on above: Mac OS treats disks with more than one
// 0xEE MBR partition as MBR disks, not as GPT disks.
- ReadCString(line, 255);
+ ReadCString(line, sizeof(line));
sscanf(line, "%x", &hexCode);
if (line[0] == '\n')
hexCode = 0x00;
@@ -480,7 +480,7 @@ int GetMBRTypeCode(int defType) {
cout << "Enter an MBR hex code (default " << hex;
cout.width(2);
cout << defType << "): " << dec;
- ReadCString(line, 255);
+ ReadCString(line, sizeof(line));
if (line[0] == '\n')
typeCode = defType;
else