mirror of https://github.com/stella-emu/stella.git
Fix warning in snprintf and g++7 and above.
This commit is contained in:
parent
f87e5d73f1
commit
9037af617d
|
@ -63,9 +63,9 @@ string Base::toString(int value, Common::Base::Format outputBase)
|
||||||
|
|
||||||
case Base::F_10: // base 10: 3 or 5 bytes (depending on value)
|
case Base::F_10: // base 10: 3 or 5 bytes (depending on value)
|
||||||
if(value < 0x100)
|
if(value < 0x100)
|
||||||
std::snprintf(vToS_buf, 4, "%3d", value);
|
std::snprintf(vToS_buf, 4, "%3d", value & 0xff);
|
||||||
else
|
else
|
||||||
std::snprintf(vToS_buf, 6, "%5d", value);
|
std::snprintf(vToS_buf, 6, "%5d", value & 0xffff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Base::F_10_02: // base 10: 2 digits (with leading zero)
|
case Base::F_10_02: // base 10: 2 digits (with leading zero)
|
||||||
|
|
Loading…
Reference in New Issue