Revision: 865 Author: bertfrees@xxxxxxxxx Date: Fri Dec 14 08:24:23 2012Log: Revert commit 844: Fix some valgrind warnings about invalid reads, i.e. do some array
Because a test failed. Need to find out why. http://code.google.com/p/liblouis/source/detail?r=865 Modified: /trunk/liblouis/lou_translateString.c ======================================= --- /trunk/liblouis/lou_translateString.c Thu Dec 13 07:25:39 2012 +++ /trunk/liblouis/lou_translateString.c Fri Dec 14 08:24:23 2012 @@ -701,7 +701,7 @@ checkMultCaps (void) { int k; - for (k = 0; k < table->lenBeginCaps && k < srcmax - src; k++) + for (k = 0; k < table->lenBeginCaps; k++) if (!checkAttr (currentInput[src + k], CTC_UpperCase, 0)) return 0; return 1; @@ -1136,7 +1136,7 @@ int curSrc; if (start >= srcmax) return 1; - while (start < srcmax && checkAttr (currentInput[start], CTC_Space, 0)) + while (checkAttr (currentInput[start], CTC_Space, 0) && start < srcmax) start++; if (start == srcmax || (transOpcode == CTO_JoinableWord && (!checkAttr (currentInput @@ -1151,7 +1151,7 @@ 0)))) return 1; end = start; - while (end < srcmax && !checkAttr (currentInput[end], CTC_Space, 0)) + while (!checkAttr (currentInput[end], CTC_Space, 0) && end < srcmax) end++; if ((mode & (compbrlAtCursor | compbrlLeftCursor)) && cursorPosition >= start && cursorPosition < end) For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com