mirror of
https://git.rtems.org/rtems-tools/
synced 2025-06-20 04:41:08 +08:00
Update the data out pointer.
The data pointer was not updating when looping. Fix the total stats to track the data in the buffer.
This commit is contained in:
parent
13b9f2b1d7
commit
194160c9a3
@ -83,8 +83,10 @@ namespace rld
|
||||
|
||||
::memcpy ((void*) (buffer + level), data, appending);
|
||||
|
||||
data += appending;
|
||||
level += appending;
|
||||
length -= appending;
|
||||
total += appending;
|
||||
|
||||
output ();
|
||||
}
|
||||
@ -108,6 +110,7 @@ namespace rld
|
||||
|
||||
level += appending;
|
||||
length -= appending;
|
||||
total += appending;
|
||||
|
||||
output ();
|
||||
}
|
||||
@ -136,13 +139,15 @@ namespace rld
|
||||
{
|
||||
if ((forced && level) || (level >= size))
|
||||
{
|
||||
total += level;
|
||||
|
||||
if (compress)
|
||||
{
|
||||
int writing = ::fastlz_compress (buffer, level, io);
|
||||
uint8_t header[2];
|
||||
|
||||
if (rld::verbose () >= RLD_VERBOSE_FULL_DEBUG)
|
||||
std::cout << "rtl: comp: offset=" << total_compressed
|
||||
<< " block-size=" << writing << std::endl;
|
||||
|
||||
header[0] = writing >> 8;
|
||||
header[1] = writing;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user