aboutsummaryrefslogtreecommitdiffstats
path: root/lib/siscomponentrecord.cpp
diff options
context:
space:
mode:
authorDaniel Brahneborg <basic@chello.se>2002-03-02 23:28:39 +0000
committerDaniel Brahneborg <basic@chello.se>2002-03-02 23:28:39 +0000
commit9df8909948bb491b1b8c53ff8e1b5ce125304aac (patch)
tree239befaacb77374dfd9c61ed45d592259bb969b0 /lib/siscomponentrecord.cpp
parent6f49fd782b8935b8caf7cea7bcb6e10644851b13 (diff)
downloadplptools-9df8909948bb491b1b8c53ff8e1b5ce125304aac.tar.gz
plptools-9df8909948bb491b1b8c53ff8e1b5ce125304aac.tar.bz2
plptools-9df8909948bb491b1b8c53ff8e1b5ce125304aac.zip
Various proto changes.
Diffstat (limited to 'lib/siscomponentrecord.cpp')
-rw-r--r--lib/siscomponentrecord.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/siscomponentrecord.cpp b/lib/siscomponentrecord.cpp
index b4b313a..ff3153f 100644
--- a/lib/siscomponentrecord.cpp
+++ b/lib/siscomponentrecord.cpp
@@ -13,7 +13,8 @@ SISComponentNameRecord::~SISComponentNameRecord()
void
SISComponentNameRecord::fillFrom(uchar* buf, int base, SISFile* sisFile)
{
- int ix = base;
+ uchar* p = buf + base;
+ int size = 0;
int n = sisFile->m_header.m_nlangs;
m_nameLengths = new uint32[n];
@@ -24,14 +25,16 @@ SISComponentNameRecord::fillFrom(uchar* buf, int base, SISFile* sisFile)
//
for (int i = 0; i < n; ++i)
{
- m_nameLengths[i] = read32(buf, &ix);
+ m_nameLengths[i] = read32(p + size);
+ size += 4;
}
// Then read ptrs.
//
for (int i = 0; i < n; ++i)
{
- m_namePtrs[i] = read32(buf, &ix);
+ m_namePtrs[i] = read32(p + size);
+ size += 4;
if (logLevel >= 2)
printf("Name %d (for %s) is %.*s\n",
i,
@@ -44,7 +47,7 @@ SISComponentNameRecord::fillFrom(uchar* buf, int base, SISFile* sisFile)
m_names[i][len] = 0;
}
if (logLevel >= 1)
- printf("%d .. %d (%d bytes): Name records\n", base, ix, ix - base);
+ printf("%d .. %d (%d bytes): Name records\n", base, base + size, size);
}
uchar*