movtextenc: fix pointer messup and out of array accesses

Fixes Ticket2187

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>