Fixed array sizes

This commit is contained in:
Thulinma 2011-03-13 15:52:00 +01:00
parent ca04c4d2ee
commit 126037b06a

View file

@ -215,7 +215,7 @@ class AMFType {
case AMF0_ECMA_ARRAY:{
int arrlen = 0;
if (contents){
arrlen = getContentP("length")->NumValue();
arrlen = contents->size();
r += arrlen / (256*256*256); r += arrlen / (256*256); r += arrlen / 256; r += arrlen % 256;
for (std::vector<AMFType>::iterator it = contents->begin(); it != contents->end(); it++){
r += it->Indice().size() / 256;
@ -231,7 +231,7 @@ class AMFType {
case AMF0_STRICT_ARRAY:{
int arrlen = 0;
if (contents){
arrlen = getContentP("length")->NumValue();
arrlen = contents->size();
r += arrlen / (256*256*256); r += arrlen / (256*256); r += arrlen / 256; r += arrlen % 256;
for (std::vector<AMFType>::iterator it = contents->begin(); it != contents->end(); it++){
r += it->Pack();