Fix for marshalling negative PyLongs on 64-bit hosts. Closes #5

This commit is contained in:
Michael Hansen
2011-09-23 19:57:50 -07:00
parent 398551ed77
commit df8db4da3c

View File

@@ -23,7 +23,7 @@ void PycLong::load(PycData* stream, PycModule*)
m_size = (hi & 0x80000000) != 0 ? -4 : 4;
} else {
m_size = stream->get32();
int actualSize = m_size & 0x7FFFFFFF;
int actualSize = m_size >= 0 ? m_size : -m_size;
for (int i=0; i<actualSize; i++)
m_value.push_back(stream->get16());
}