summaryrefslogtreecommitdiffstats
path: root/src/Util.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/Util.vala')
-rw-r--r--src/Util.vala13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Util.vala b/src/Util.vala
index 3666f96..7c704fb 100644
--- a/src/Util.vala
+++ b/src/Util.vala
@@ -32,14 +32,11 @@ namespace Eva {
}
private List string_to_list(string str) {
- List ret = new List();
-
- for(unowned string rest = str; rest.length > 0; rest = rest.next_char()) {
- unichar c = rest.get_char();
-
- ret.list.add(new UInt(c));
+ if(str.length == 0) {
+ return List.empty;
+ }
+ else {
+ return new List(new UInt(str.get_char()), string_to_list(str.next_char()));
}
-
- return ret;
}
}