[liblouis-liblouisxml] [liblouis] r1070 committed - fixed indexing when a character is undefined

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Fri, 18 Oct 2013 17:35:37 +0000

Revision: 1070
Author:   john.boyer@xxxxxxxxxxxxxxxxx
Date:     Fri Oct 18 17:35:21 2013 UTC
Log:      fixed indexing when a character is undefined
http://code.google.com/p/liblouis/source/detail?r=1070

Modified:
 /trunk/liblouis/lou_translateString.c

=======================================
--- /trunk/liblouis/lou_translateString.c       Mon Sep 16 20:38:49 2013 UTC
+++ /trunk/liblouis/lou_translateString.c       Fri Oct 18 17:35:21 2013 UTC
@@ -1541,6 +1541,7 @@
 /*Display an undefined character in the output buffer*/
   int k;
   char *display;
+  widechar displayDots[20];
   if (table->undefined)
     {
       TranslationTableRule *transRule = (TranslationTableRule *)
@@ -1552,16 +1553,10 @@
       return 1;
     }
   display = showString (&c, 1);
-  if ((dest + strlen (display)) > destmax)
+  for (k = 0; k < strlen (display); k++)
+    displayDots[k] = getDotsForChar (display[k]);
+  if (!for_updatePositions (displayDots, 1, strlen(display)))
     return 0;
-  if (outputPositions != NULL)
-    outputPositions[prevSrcMapping[src]] = dest;
-  for (k = 0; k < strlen (display); k++)
-    {
-      if (inputPositions != NULL)
-       srcMapping[dest] = prevSrcMapping[src];
-      currentOutput[dest++] = getDotsForChar (display[k]);
-    }
   return 1;
 }

For a description of the software, to download it and links to
project pages go to http://www.abilitiessoft.com

Other related posts:

  • » [liblouis-liblouisxml] [liblouis] r1070 committed - fixed indexing when a character is undefined - liblouis