[rygel] core: Fix search expression parsing



commit 7a53ad4ac7cd0cea9eda698a58d521158200b9fd
Author: Jens Georg <mail jensge org>
Date:   Fri Mar 12 22:11:28 2010 +0100

    core: Fix search expression parsing
    
    GScanner.input_text needs the byte count not the character count. This
    caused problems parsing the search expression if a string contained
    characters not within the original latin1 range.

 src/rygel/rygel-search-criteria-parser.vala |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-search-criteria-parser.vala b/src/rygel/rygel-search-criteria-parser.vala
index ad3df4d..debc47b 100644
--- a/src/rygel/rygel-search-criteria-parser.vala
+++ b/src/rygel/rygel-search-criteria-parser.vala
@@ -125,7 +125,7 @@ internal class Rygel.SearchCriteriaParser : Object, StateMachine {
             this.completed ();
         }
 
-        this.scanner.input_text (this.str, (uint) this.str.length);
+        this.scanner.input_text (this.str, (uint) this.str.size());
         this.scanner.get_next_token ();
         try {
             this.expression = this.parse_or_expression ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]