[liblouis-liblouisxml] [liblouis commit] r65 - in trunk: . liblouis

  • From: codesite-noreply@xxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Wed, 14 Jan 2009 05:13:30 +0000

Author: jamie@xxxxxxxxxxx
Date: Tue Jan 13 20:39:34 2009
New Revision: 65

Modified:
   trunk/ChangeLog
   trunk/liblouis/lou_translateString.c

Log:
* liblouis/lou_translateString.c: Fix the inpos array values for the case where a rule has an output length which is larger than its input length. For example, using UEBC, given the input #, the output will be _?. The array mapping from output to input (inpos) previously specified [0, 1], which is incorrect; there is no character at index 1 in the input. The correct result is now returned; i.e. [0, 0].

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog     (original)
+++ trunk/ChangeLog     Tue Jan 13 20:39:34 2009
@@ -1,3 +1,7 @@
+2009-01-14  James Teh <jamie@xxxxxxxxxxx>
+
+ * liblouis/lou_translateString.c: Fix the inpos array values for the case where a rule has an output length which is larger than its input length. For example, using UEBC, given the input "#", the output will be "_?". The array mapping from output to input (inpos) previously specified [0, 1], which is incorrect; there is no character at index 1 in the input. The correct result is now returned; i.e. [0, 0].
+
 2009-01-12 John J. Boyer <john.boyer@xxxxxxxxxxxxxxxx>

        * Fixed problem with French Braille

Modified: trunk/liblouis/lou_translateString.c
==============================================================================
--- trunk/liblouis/lou_translateString.c        (original)
+++ trunk/liblouis/lou_translateString.c        Tue Jan 13 20:39:34 2009
@@ -415,7 +415,7 @@
            }
          for (k = inLength; k < outLength; k++)
            if (inputPositions != NULL)
-             inputPositions[dest + k] = src + inLength;
+             inputPositions[dest + k] = src + (inLength > 0 ? inLength - 1 : 
0);
        }
     }
   dest += outLength;
For a description of the software and to download it go to
http://www.jjb-software.com

Other related posts:

  • » [liblouis-liblouisxml] [liblouis commit] r65 - in trunk: . liblouis - codesite-noreply