From 850f47261dac3742fa3142808afe92b7c0066c98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=2E=20Urba=C5=84czyk?= Date: Wed, 17 Apr 2013 19:09:54 +0000 Subject: [PATCH] ID should be always outputted as number (not char). --- lib/GameConstants.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/GameConstants.h b/lib/GameConstants.h index 0f7bdec4f..362a5af45 100644 --- a/lib/GameConstants.h +++ b/lib/GameConstants.h @@ -168,7 +168,8 @@ std::ostream & operator << (std::ostream & os, BaseForID id); template std::ostream & operator << (std::ostream & os, BaseForID id) { - return os << id.getNum(); + //We use common type with short to force char and unsigned char to be promoted and formatted as numbers. + return os << boost::common_type::type(id.getNum()); } class ArtifactInstanceID : public BaseForID