[haiku-commits] r37185 - haiku/trunk/src/bin/locale

  • From: pulkomandy@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 21 Jun 2010 12:10:37 +0200 (CEST)

Author: pulkomandy
Date: 2010-06-21 12:10:36 +0200 (Mon, 21 Jun 2010)
New Revision: 37185
Changeset: http://dev.haiku-os.org/changeset/37185/haiku
Ticket: http://dev.haiku-os.org/ticket/4840

Modified:
   haiku/trunk/src/bin/locale/collectcatkeys.cpp
Log:
Fix a bug in native version of collectcatkeys (not the one used in 
buildtools) that prevented it from working at all. This fixes #4840


Modified: haiku/trunk/src/bin/locale/collectcatkeys.cpp
===================================================================
--- haiku/trunk/src/bin/locale/collectcatkeys.cpp       2010-06-21 10:03:15 UTC 
(rev 37184)
+++ haiku/trunk/src/bin/locale/collectcatkeys.cpp       2010-06-21 10:10:36 UTC 
(rev 37185)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2003-2009, Haiku.
+ * Copyright 2003-2010, Haiku.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
@@ -64,11 +64,13 @@
 fetchStr(const char *&in, BString &str, bool lookForID)
 {
        int parLevel = 0;
+
        while (isspace(*in) || *in == '(') {
                if (*in == '(')
                        parLevel++;
                in++;
        }
+
        if (*in == '"') {
                bool inString = true;
                bool quoted = false;
@@ -77,7 +79,7 @@
                {
                        // Collect string content until we find a quote marking 
end of
                        // string (skip escaped quotes)
-                       while (*in != '"' || !quoted)
+                       while (*in != '"' || quoted)
                        {
                                str.Append(in,1);
                                if (*in == '\\' && !quoted)
@@ -251,6 +253,7 @@
                                usage();
                }
        }
+
        if (!outputFile.Length() && inputFile) {
                // generate default output-file from input-file by replacing
                // the extension with '.catkeys':
@@ -270,6 +273,7 @@
                        strerror(res));
                exit(-1);
        }
+
        off_t sz;
        inFile.GetSize(&sz);
        if (sz > 0) {


Other related posts:

  • » [haiku-commits] r37185 - haiku/trunk/src/bin/locale - pulkomandy