instant: fix infinite loop seen in non-C locales
authorJon Trulson <jon@radscan.com>
Wed, 20 Jun 2012 02:02:56 +0000 (20:02 -0600)
committerJon Trulson <jon@radscan.com>
Wed, 20 Jun 2012 02:02:56 +0000 (20:02 -0600)
cde/programs/dtdocbook/instant/main.c

index 2de16a88c18561de8c97376bc58e5985e548749b..2a917639cdac83f5d756712bb3d4d457d193a9d9 100644 (file)
@@ -455,7 +455,10 @@ static int CompareI18NStrings(ClientData clientData,
            }
            cp++;
        } else {
+         if (len > 0)
            cp += len;
+         else
+           break; /* JET - we should be done here... */
        }
     }
     cp = argv[2];
@@ -466,7 +469,10 @@ static int CompareI18NStrings(ClientData clientData,
            }
            cp++;
        } else {
+         if (len > 0)
            cp += len;
+         else
+           break; /* JET - we should be done here... */
        }
     }