[liblouis-liblouisxml] Fix for extra space after 'changetable'

  • From: Paul Wood <paulw@xxxxxxxxxxxxxx>
  • To: "liblouis-liblouisxml@xxxxxxxxxxxxx" <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Mon, 30 Jun 2014 15:40:11 +0100

Hi Guys,
We have a university student volunteering with us for the summer! So he thinks he has found the cause of the extra space after the changetable opcode. I'm worried it will break something else and I don't think we can run the checks as we are using windows.

The line is in 'transcriber.c' and is in the function 'insert_translation (const char *table)'
It's after:
if (ud->translated_length > 0 && ud->translated_length <
      MAX_TRANS_LENGTH &&
      ud->translated_buffer[ud->translated_length - 1] > 32)
    {

and is:
ud->translated_buffer[ud->translated_length++] = 32;

He tells me 32 is the ascii for space, so basically it's adding a space.
Please tell me if we can do the checks under windows and what else we need to do ie. create a fork etc.
Thanks
Paul

--
Paulw.torchtrust signature

Paul Wood, Chief Technical Officer
*Torch Trust*
Torch House, Torch Way,
Market Harborough, Leics. LE16 9HL, UK
Direct Line: *+44(0)1858 438269*
Tel: *+44(0)1858 438260*, Fax: *+44(0)1858 438275*
Email: paulw@xxxxxxxxxxxxxx <mailto:paulw@xxxxxxxxxxxxxx>
Website: www.torchtrust.org <http://www.torchtrust.org/>

____________________________________________________

Chief Executive: Dr Gordon Temple
Charity No. 1095904

Privileged/Confidential Information may be contained in this message.
If you are not the intended recipient please destroy this message
and kindly notify the sender by reply email. The computer from which
this mail originates is equipped with virus screening software.
However Torch Trust cannot guarantee that the mail and its attachments
are free from virus infection.

Other related posts: