Fix zippy bughouse partner bug
authorH.G. Muller <h.g.muller@hccnet.nl>
Mon, 2 May 2011 13:00:03 +0000 (15:00 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Wed, 4 May 2011 16:40:45 +0000 (18:40 +0200)
The patchs to subject Zippy messages to coloriation was faulty, because
there were messages recognized by zippy that were not colorized, and
such messages would then not be 'read away' after zippy recognition
(except for the first character). As a result the messages were
processed over and over again.

backend.c

index 6c68aa5..43379fc 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -2983,9 +2983,9 @@ read_from_ics(isr, closure, data, count, error)
                }
            } // [HGM] chat: end of patch
 
+          backup = i;
            if (appData.zippyTalk || appData.zippyPlay) {
                 /* [DM] Backup address for color zippy lines */
-                backup = i;
 #if ZIPPY
                if (loggedOn == TRUE)
                        if (ZippyControl(buf, &backup) || ZippyConverse(buf, &backup) ||
@@ -3150,6 +3150,8 @@ read_from_ics(isr, closure, data, count, error)
                    continue;
            }
 
+          if(i < backup) { i = backup; continue; } // [HGM] for if ZippyControl matches, but the colorie code doesn't
+
            if (looking_at(buf, &i, "\\   ")) {
                if (prevColor != ColorNormal) {
                    if (oldi > next_out) {