diff options
author | William Grant <wgrant@ubuntu.com> | 2015-06-19 19:55:27 +1000 |
---|---|---|
committer | William Grant <wgrant@ubuntu.com> | 2015-06-19 20:03:29 +1000 |
commit | 5b2c6c89be2837a3988128467ec85bf567d9c552 (patch) | |
tree | 2bf2ba37878796ba81b73be8c8ae7f669e23d9c8 /support.cc | |
parent | 8017e083aac6377e95170d520184c1834e9021a4 (diff) | |
download | sgdisk-5b2c6c89be2837a3988128467ec85bf567d9c552.tar.gz |
Don't leave suffix uninitialised when none was passed to IeeeToInt.
Fixes incorrect partition boundaries and other failures on ppc64el and
possibly other architectures.
Diffstat (limited to 'support.cc')
-rw-r--r-- | support.cc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -144,7 +144,7 @@ uint64_t GetSectorNum(uint64_t low, uint64_t high, uint64_t def, uint64_t sSize, uint64_t IeeeToInt(string inValue, uint64_t sSize, uint64_t low, uint64_t high, uint64_t def) { uint64_t response = def, bytesPerUnit = 1, mult = 1, divide = 1; size_t foundAt = 0; - char suffix, plusFlag = ' '; + char suffix = ' ', plusFlag = ' '; string suffixes = "KMGTPE"; int badInput = 0; // flag bad input; once this goes to 1, other values are irrelevant |