diff options
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.... |