[sword-svn] r3114 - trunk/src/modules/filters
chrislit at crosswire.org
chrislit at crosswire.org
Wed Mar 12 06:13:05 MST 2014
Author: chrislit
Date: 2014-03-12 06:13:05 -0700 (Wed, 12 Mar 2014)
New Revision: 3114
Modified:
trunk/src/modules/filters/scsuutf8.cpp
Log:
preincrement to postincrement correction... Swapping preincrements for postincrements in array notation is dumb. I am dumb.
Modified: trunk/src/modules/filters/scsuutf8.cpp
===================================================================
--- trunk/src/modules/filters/scsuutf8.cpp 2014-03-12 12:42:07 UTC (rev 3113)
+++ trunk/src/modules/filters/scsuutf8.cpp 2014-03-12 13:13:05 UTC (rev 3114)
@@ -152,7 +152,7 @@
for (int i = 0; i < len;) {
if (i >= len) break;
- c = scsuString[++i];
+ c = scsuString[i++];
if (c >= 0x80)
{
@@ -169,7 +169,7 @@
else if (c >= 0x1 && c <= 0x8) // SQn
{
if (i >= len) break;
- d = scsuString[++i]; // single quote
+ d = scsuString[i++]; // single quote
UTF8Output(d < 0x80 ? d + start[c - 0x1] :
d - 0x80 + slide[c - 0x1], &utf8Buf);
@@ -182,25 +182,25 @@
{
active = c - 0x18; // define window
if (i >= len) break;
- slide[active] = win[(unsigned char)scsuString[++i]];
+ slide[active] = win[(unsigned char)scsuString[i++]];
}
else if (c == 0xB) // SDX
{
if (i >= len) break;
- c = scsuString[++i];
+ c = scsuString[i++];
if (i >= len) break;
- d = scsuString[++i];
+ d = scsuString[i++];
slide[active = c>>5] = 0x10000 + (((c & 0x1F) << 8 | d) << 7);
}
else if (c == 0xE) // SQU
{
if (i >= len) break;
- c = scsuString[++i]; // SQU
+ c = scsuString[i++]; // SQU
if (i >= len) break;
- UTF8Output(c << 8 | scsuString[++i], &utf8Buf);
+ UTF8Output(c << 8 | scsuString[i++], &utf8Buf);
}
else if (c == 0xF) // SCU
{
@@ -209,20 +209,20 @@
while (mode)
{
if (i >= len) break;
- c = scsuString[++i];
+ c = scsuString[i++];
if (c <= 0xDF || c >= 0xF3)
{
if (i >= len) break;
- UTF8Output(c << 8 | scsuString[++i], &utf8Buf);
+ UTF8Output(c << 8 | scsuString[i++], &utf8Buf);
}
else if (c == 0xF0) // UQU
{
if (i >= len) break;
- c = scsuString[++i];
+ c = scsuString[i++];
if (i >= len) break;
- UTF8Output(c << 8 | scsuString[++i], &utf8Buf);
+ UTF8Output(c << 8 | scsuString[i++], &utf8Buf);
}
else if (c >= 0xE0 && c <= 0xE7) // UCn
{
@@ -232,16 +232,16 @@
else if (c >= 0xE8 && c <= 0xEF) // UDn
{
if (i >= len) break;
- slide[active=c-0xE8] = win[(unsigned char)scsuString[++i]];
+ slide[active=c-0xE8] = win[(unsigned char)scsuString[i++]];
mode = 0;
}
else if (c == 0xF1) // UDX
{
if (i >= len) break;
- c = scsuString[++i];
+ c = scsuString[i++];
if (i >= len) break;
- d = scsuString[++i];
+ d = scsuString[i++];
slide[active = c>>5] =
0x10000 + (((c & 0x1F) << 8 | d) << 7);
More information about the sword-cvs
mailing list