--- parrot-svn/src/packfile/pf_items.c Tue Mar 10 08:05:04 2009 +++ parrot-andy/src/packfile/pf_items.c Tue Mar 10 11:55:04 2009 @@ -1370,16 +1370,13 @@ size_t i; mem_sys_memcopy(charcursor, s->strstart, s->bufused); charcursor += s->bufused; - - if (s->bufused % sizeof (opcode_t)) { - for (i = 0; i < (sizeof (opcode_t) - - (s->bufused % sizeof (opcode_t))); i++) { - *charcursor++ = 0; - } + /* Pad up to sizeof(opcode_t) boundary. */ + while ( (unsigned long) (charcursor - (char *) cursor) % sizeof(opcode_t)) { + *charcursor++ = 0; } } - PARROT_ASSERT(((long)charcursor & 3) == 0); - cursor = (opcode_t *)charcursor; + PARROT_ASSERT(((unsigned long) (charcursor - (char *) cursor) % sizeof(opcode_t)) == 0); + cursor += (charcursor - (char *) cursor) / sizeof(opcode_t); return cursor; }