]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Fix source filenames having non-utf8 path components
authorLuca Bruno <lucabru@src.gnome.org>
Wed, 4 Mar 2015 15:16:00 +0000 (16:16 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Wed, 4 Mar 2015 15:16:02 +0000 (16:16 +0100)
Fixes bug 742071

vala/valacodecontext.vala

index b9ac824c2e9a89de1515d794fb4f1e3505594c45..612ca2aabb6a3891fc429df56e16eef04241e300 100644 (file)
@@ -641,7 +641,8 @@ public class Vala.CodeContext {
                                        rpath += Path.DIR_SEPARATOR_S;
                                }
 
-                               rpath += start.substring (0, len);
+                               // don't use len, substring works on bytes
+                               rpath += start.substring (0, (long)((char*)end - (char*)start));
                        }
                }