diff options
author | srs5694 <srs5694@users.sourceforge.net> | 2010-02-19 17:19:55 -0500 |
---|---|---|
committer | srs5694 <srs5694@users.sourceforge.net> | 2010-02-19 17:19:55 -0500 |
commit | 08bb0da07953af605b4918e268272de15ac151aa (patch) | |
tree | 401ff14b62ddfda4c4c64b3dfcee817ad8133971 /attributes.cc | |
parent | fad064250bf6c49eb4966bf0f617591a0821808e (diff) | |
download | sgdisk-08bb0da07953af605b4918e268272de15ac151aa.tar.gz |
Version 0.6.4
Diffstat (limited to 'attributes.cc')
-rw-r--r-- | attributes.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/attributes.cc b/attributes.cc index b0800fa..ac9f1fc 100644 --- a/attributes.cc +++ b/attributes.cc @@ -12,6 +12,7 @@ #include <stdint.h> #include <stdio.h> #include <iostream> +#include <sstream> #include "attributes.h" using namespace std; @@ -20,13 +21,13 @@ using namespace std; // data. Attributes::Attributes(void) { int i; - char temp[ATR_NAME_SIZE]; + ostringstream temp; // Most bits are undefined, so start by giving them an // appropriate name for (i = 1; i < NUM_ATR; i++) { - sprintf(temp, "Undefined bit #%d", i); - atNames[i] = temp; + temp << "Undefined bit #" << i; + atNames[i] = temp.str(); } // for // Now reset those names that are defined.... |