[liblouis-liblouisxml] [liblouis] r839 committed - Bugfix: typebuf has to be transformed after a pass0

  • From: liblouis@xxxxxxxxxxxxxx
  • To: liblouis-liblouisxml@xxxxxxxxxxxxx
  • Date: Thu, 29 Nov 2012 13:21:14 +0000

Revision: 839
Author:   bertfrees@xxxxxxxxx
Date:     Thu Nov 29 04:44:00 2012
Log:      Bugfix: typebuf has to be transformed after a pass0
http://code.google.com/p/liblouis/source/detail?r=839

Modified:
 /trunk/liblouis/transcommon.ci

=======================================
--- /trunk/liblouis/transcommon.ci      Thu Nov  1 18:35:08 2012
+++ /trunk/liblouis/transcommon.ci      Thu Nov 29 04:44:00 2012
@@ -260,6 +260,16 @@
          break;
        }
     }
+
+    { // We have to transform typebuf accordingly
+ unsigned short* typebuf_temp = malloc (dest * sizeof (unsigned short));
+      int pos;
+      for (pos = 0; pos < dest; pos++)
+        typebuf_temp[pos] = typebuf[srcMapping[pos]];
+      memcpy (typebuf, typebuf_temp, dest * sizeof (unsigned short));
+      free(typebuf_temp);
+    }
+
 failure:
   realInlen = src;
   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] r839 committed - Bugfix: typebuf has to be transformed after a pass0 - liblouis