diff --git a/Makefile b/Makefile index b0f8b0c..3ffad5f 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ V_MAJOR = 0 V_MIDDLE = 0 V_MINOR = 3 V_VARIETY = B_APPV_DEVELOPMENT -V_BUILD = 12 +V_BUILD = 13 TARGET_DIR := ./dist PACKAGE = $(TARGET_DIR)/$(NAME)_$(VERSION)-$(ARCH).hpkg diff --git a/StreamIO.cpp b/StreamIO.cpp index afdb952..731737e 100644 --- a/StreamIO.cpp +++ b/StreamIO.cpp @@ -199,7 +199,6 @@ StreamIO::DataWithMetaReceived(BUrlRequest* request, const char* data, off_t pos if (fUntilMetaEnd <= size) { memcpy(fMetaBuffer + fMetaSize, (void*)data, fUntilMetaEnd); data += fUntilMetaEnd; - position += fUntilMetaEnd; size -= fUntilMetaEnd; fMetaSize += fUntilMetaEnd; fMetaBuffer[fMetaSize] = 0; @@ -214,9 +213,8 @@ StreamIO::DataWithMetaReceived(BUrlRequest* request, const char* data, off_t pos memcpy(fMetaBuffer + fMetaSize, (void*)data, size); fMetaSize += size; data += size; - size = 0; - position += size; fUntilMetaEnd -= size; + size = 0; } } else { DataFunc nextFunc = fDataFuncs.Item(next); @@ -235,15 +233,13 @@ StreamIO::DataWithMetaReceived(BUrlRequest* request, const char* data, off_t pos fUntilMetaStart = fMetaInt; TRACE("Meta: Empty\n"); } else if (fUntilMetaEnd > 512) { + TRACE("Meta: Size of %" B_PRIdOFF " too large\n", fUntilMetaEnd); fUntilMetaStart = fMetaInt; fUntilMetaEnd = 0; - TRACE("Meta: Size of " B_PRIdOFF " too large\n"); data--; - position--; size++; } data++; - position++; size--; } }