summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/database.c2
-rw-r--r--apps/dbtree.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/database.c b/apps/database.c
index 1258b94..0d562d5 100644
--- a/apps/database.c
+++ b/apps/database.c
@@ -79,7 +79,7 @@ int tagdb_init(void)
#ifdef LITTLE_ENDIAN
p=(int *)&tagdbheader;
for(i=0;i<17;i++) {
- *p=BE32(p);
+ *p=BE32(*p);
p++;
}
#endif
diff --git a/apps/dbtree.c b/apps/dbtree.c
index 187cb61..61879e3 100644
--- a/apps/dbtree.c
+++ b/apps/dbtree.c
@@ -168,7 +168,7 @@ int db_load(struct tree_context* c)
return -1;
#ifdef LITTLE_ENDIAN
- for (i=0; i<albumarraylen; i++)
+ for (i=0; i<tagdbheader.albumarraylen; i++)
safeplace[i] = BE32(safeplace[i]);
#endif
offset = safeplace[0];
@@ -187,7 +187,7 @@ int db_load(struct tree_context* c)
return -1;
#ifdef LITTLE_ENDIAN
- for (i=0; i<songarraylen; i++) {
+ for (i=0; i<tagdbheader.songarraylen; i++) {
safeplace[i] = BE32(safeplace[i]);
DEBUGF("db_load songs4album song %d: 0x%x\n",i,safeplace[i]);
}