summaryrefslogtreecommitdiff
path: root/Database/internals/database-internal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Database/internals/database-internal.cpp')
-rw-r--r--Database/internals/database-internal.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Database/internals/database-internal.cpp b/Database/internals/database-internal.cpp
index e564c01..ce54f44 100644
--- a/Database/internals/database-internal.cpp
+++ b/Database/internals/database-internal.cpp
@@ -1,14 +1,16 @@
#include "database-internal.h"
#include "database.h"
-DatabaseCell::DatabaseCell(Cpu * cpu, Uint64 cpu_base, absolute_ptr origin, Uint32 size, Uint32 extra_size, DatabaseCell * prev, Database * parent) : cpu(cpu), next(0), prev(prev), parent(parent) {
- prev->next = this;
+DatabaseCell::DatabaseCell(Database * parent, Cpu * cpu, Uint64 cpu_base, absolute_ptr origin, Uint32 size, Uint32 extra_size, const Byte * data) : cpu(cpu), next(0), parent(parent) {
+ prev = parent->getEnd();
+ if (prev)
+ prev->next = this;
parent->setEnd(this);
if (origin.raw_ptr) {
Segment * origin_seg = parent->getSegment(SEGID(origin));
segment = new Segment(size, cpu_base, parent->GetNextSegId(), extra_size, origin_seg->getPristineMemory() + SEGOFFSET(origin));
} else {
- segment = new Segment(size, cpu_base, parent->GetNextSegId(), extra_size);
+ segment = new Segment(size, cpu_base, parent->GetNextSegId(), extra_size, data);
}
}