[vala] Fix source filenames having non-utf8 path components
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Fix source filenames having non-utf8 path components
- Date: Wed, 4 Mar 2015 15:16:42 +0000 (UTC)
commit 2ac1eacaba7753913a613d6eca2186bfe68b3fee
Author: Luca Bruno <lucabru src gnome org>
Date: Wed Mar 4 16:16:00 2015 +0100
Fix source filenames having non-utf8 path components
Fixes bug 742071
vala/valacodecontext.vala | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala
index b9ac824..612ca2a 100644
--- a/vala/valacodecontext.vala
+++ b/vala/valacodecontext.vala
@@ -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));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]