]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix handling of non-ASCII characters in comments
authorJürg Billeter <j@bitron.ch>
Sun, 31 May 2009 17:03:52 +0000 (19:03 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 31 May 2009 17:03:52 +0000 (19:03 +0200)
vala/valascanner.vala

index 4177fb84d88360b6dd9dbaa715cdfc59525bf3ae..adbeb4514b2c3b62a7a5e314737fca963a3fe557 100644 (file)
@@ -1129,9 +1129,9 @@ public class Vala.Scanner {
                var result_builder = new StringBuilder (_comment);
                _comment = null;
                
-               weak string index;
+               string* index;
                while ((index = result_builder.str.chr (-1, '\t')) != null) {
-                       result_builder.erase (result_builder.str.pointer_to_offset (index), 1);
+                       result_builder.erase ((long) (index - (string*) result_builder.str), 1);
                }
                
                return result_builder.str;