summaryrefslogtreecommitdiffstats
path: root/src/NBT/ShortTag.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/NBT/ShortTag.hpp')
-rw-r--r--src/NBT/ShortTag.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/NBT/ShortTag.hpp b/src/NBT/ShortTag.hpp
index 7415317..c08e1fe 100644
--- a/src/NBT/ShortTag.hpp
+++ b/src/NBT/ShortTag.hpp
@@ -47,6 +47,12 @@ public:
return Type::Short;
}
+ virtual void print(std::ostream& os, const std::string &) const {
+ os << getValue() << " / "
+ << (int16_t)getValue() << " / "
+ << std::hex << "0x" << getValue() << std::dec;
+ }
+
uint16_t getValue() const {
return Buffer::parse16(ptr);
}