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.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/NBT/ShortTag.hpp b/src/NBT/ShortTag.hpp
index a44ca9b..7415317 100644
--- a/src/NBT/ShortTag.hpp
+++ b/src/NBT/ShortTag.hpp
@@ -36,11 +36,10 @@ class ShortTag : public Tag {
private:
friend class Tag;
- uint16_t value;
+ const uint8_t *ptr;
ShortTag(Buffer *buffer) {
- value = buffer->get() << 8;
- value |= buffer->get();
+ ptr = buffer->get(2);
}
public:
@@ -49,7 +48,7 @@ public:
}
uint16_t getValue() const {
- return value;
+ return Buffer::parse16(ptr);
}
};