Fixed possible data alignment problem while committing the tagcache.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9259 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2006-03-26 15:27:44 +00:00
parent 358055ece9
commit d1f9495c83

View file

@ -751,7 +751,7 @@ static bool tempbuf_insert(char *str, int id)
/* Make sure the entry is long aligned. */ /* Make sure the entry is long aligned. */
if ((long)index[tempbufidx].id & 0x03) if ((long)index[tempbufidx].id & 0x03)
{ {
int fix = 4 - ((long)id & 0x03); int fix = 4 - ((long)index[tempbufidx].id & 0x03);
tempbuf_left -= fix; tempbuf_left -= fix;
tempbuf_pos += fix; tempbuf_pos += fix;
index[tempbufidx].id = (struct tempbuf_id *)(( index[tempbufidx].id = (struct tempbuf_id *)((