diff options
author | Nathan Binkert <binkertn@umich.edu> | 2006-12-18 14:07:52 -0800 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2006-12-18 14:07:52 -0800 |
commit | 9b40a13728236f1d1d89d5a2169dab28f537d18c (patch) | |
tree | f07d1c1a580546bdb04826c3d165b58de03743ee /src/base | |
parent | 6841f863c5dee6ce2028ba647254ec9ad27a57fd (diff) | |
download | gem5-9b40a13728236f1d1d89d5a2169dab28f537d18c.tar.xz |
cast chars to int when we want to print integers so we get a number
instead of a character
--HG--
extra : convert_revision : 7bfa88ba23ad057b751eb01a80416d9f72cfe81a
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/cprintf_formats.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/base/cprintf_formats.hh b/src/base/cprintf_formats.hh index 58ee7f795..3ea20446d 100644 --- a/src/base/cprintf_formats.hh +++ b/src/base/cprintf_formats.hh @@ -288,13 +288,13 @@ format_integer(std::ostream &out, const T &data, Format &fmt) { _format_integer(out, data, fmt); } inline void format_integer(std::ostream &out, char data, Format &fmt) -{ _format_integer(out, data, fmt); } +{ _format_integer(out, (int)data, fmt); } inline void format_integer(std::ostream &out, unsigned char data, Format &fmt) -{ _format_integer(out, data, fmt); } +{ _format_integer(out, (int)data, fmt); } inline void format_integer(std::ostream &out, signed char data, Format &fmt) -{ _format_integer(out, data, fmt); } +{ _format_integer(out, (int)data, fmt); } #if 0 inline void format_integer(std::ostream &out, short data, Format &fmt) |