$A905:AD 30 60 LDA $6030 = #$09
$A908:C9 08 CMP #$08
$A90A:F0 0A BEQ $A916
The problem is most likely in there.
Are you sure this thing does what you think it does? It just compares your "String length" to 08 and 10 and if none of those, it copies certain data to 22. This seems illogical. Actually, 08 and 10 would correspondent to the x values after the string which are red and not imho.
Seriously guys, get away from trace logs and give full source at least for one routine you want help with.
cYa,
Tauwasser