summaryrefslogtreecommitdiff
path: root/cpp/src/qmf/engine/ValueImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qmf/engine/ValueImpl.cpp')
-rw-r--r--cpp/src/qmf/engine/ValueImpl.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/qmf/engine/ValueImpl.cpp b/cpp/src/qmf/engine/ValueImpl.cpp
index 72c68c420b..c58c28e166 100644
--- a/cpp/src/qmf/engine/ValueImpl.cpp
+++ b/cpp/src/qmf/engine/ValueImpl.cpp
@@ -121,10 +121,14 @@ void ValueImpl::initMap(const FieldTable& ft)
case 0x22 : subval->setUint(fvalue.get<int>()); break;
}
insert(name.c_str(), subval);
- } else if ((amqType & 0xCF) == 0x01) {
+ } else if (amqType == 0x31) { // int64
Value* subval(new Value(TYPE_INT64));
subval->setInt64(fvalue.get<int64_t>());
insert(name.c_str(), subval);
+ } else if ((amqType & 0xCF) == 0x01) { // 0x01:int8, 0x11:int16, 0x21:int21
+ Value* subval(new Value(TYPE_INT32));
+ subval->setInt((int32_t)fvalue.get<int>());
+ insert(name.c_str(), subval);
} else if (amqType == 0x85 || amqType == 0x95) {
Value* subval(new Value(TYPE_LSTR));
subval->setString(fvalue.get<string>().c_str());
@@ -233,15 +237,19 @@ void ValueImpl::initList(const List& fl)
} else if ((amqType & 0xCF) == 0x02) {
Value* subval(new Value(TYPE_UINT32));
switch (amqType) {
- case 0x02 : subval->setUint(fvalue.get<int>()); break;
- case 0x12 : subval->setUint(fvalue.get<int>()); break;
- case 0x22 : subval->setUint(fvalue.get<int>()); break;
+ case 0x02 : subval->setUint(fvalue.get<int>()); break; // uint8
+ case 0x12 : subval->setUint(fvalue.get<int>()); break; // uint16
+ case 0x22 : subval->setUint(fvalue.get<int>()); break; // uint32
}
appendToList(subval);
- } else if ((amqType & 0xCF) == 0x01) {
+ } else if (amqType == 0x31) { // int64
Value* subval(new Value(TYPE_INT64));
subval->setInt64(fvalue.get<int64_t>());
appendToList(subval);
+ } else if ((amqType & 0xCF) == 0x01) { // 0x01:int8, 0x11:int16, 0x21:int32
+ Value* subval(new Value(TYPE_INT32));
+ subval->setInt((int32_t)fvalue.get<int>());
+ appendToList(subval);
} else if (amqType == 0x85 || amqType == 0x95) {
Value* subval(new Value(TYPE_LSTR));
subval->setString(fvalue.get<string>().c_str());