fixed two buffer overrun problems in addchar() for right to left mode

Feel free to delete or modify debug print statements, some aren't very useful.